Sfoglia il codice sorgente

Merge branch 'master' into fixes/TryGetRunProperties

Benedikt Stebner 4 anni fa
parent
commit
10e70eb86b
83 ha cambiato i file con 1878 aggiunte e 2459 eliminazioni
  1. 18 4
      Documentation/build.md
  2. 8 0
      samples/ControlCatalog/App.xaml.cs
  3. 23 53
      samples/ControlCatalog/Pages/ViewboxPage.xaml
  4. 20 1
      samples/ControlCatalog/Pages/ViewboxPage.xaml.cs
  5. 4 3
      samples/RenderDemo/Pages/AnimationsPage.xaml
  6. 61 4
      samples/RenderDemo/Pages/TransitionsPage.xaml
  7. 11 0
      src/Avalonia.Animation/Animation.cs
  8. 7 1
      src/Avalonia.Animation/Animators/Animator`1.cs
  9. 5 5
      src/Avalonia.Animation/Transitions/DoubleTransition.cs
  10. 5 2
      src/Avalonia.Animation/Transitions/FloatTransition.cs
  11. 5 2
      src/Avalonia.Animation/Transitions/IntegerTransition.cs
  12. 1 1
      src/Avalonia.Base/PropertyStore/BindingEntry.cs
  13. 4 2
      src/Avalonia.Controls.DataGrid/DataGrid.cs
  14. 2 1
      src/Avalonia.Controls/ApiCompatBaseline.txt
  15. 4 2
      src/Avalonia.Controls/Image.cs
  16. 29 58
      src/Avalonia.Controls/Viewbox.cs
  17. 0 22
      src/Avalonia.Diagnostics/Diagnostics/Converters/BoolToBrushConverter.cs
  18. 2 0
      src/Avalonia.Diagnostics/Diagnostics/Models/EventChainLink.cs
  19. 23 6
      src/Avalonia.Diagnostics/Diagnostics/ViewModels/ControlLayoutViewModel.cs
  20. 1 9
      src/Avalonia.Diagnostics/Diagnostics/ViewModels/EventOwnerTreeNode.cs
  21. 6 3
      src/Avalonia.Diagnostics/Diagnostics/ViewModels/EventTreeNode.cs
  22. 8 0
      src/Avalonia.Diagnostics/Diagnostics/ViewModels/EventTreeNodeBase.cs
  23. 153 7
      src/Avalonia.Diagnostics/Diagnostics/ViewModels/EventsPageViewModel.cs
  24. 10 5
      src/Avalonia.Diagnostics/Diagnostics/ViewModels/FiredEvent.cs
  25. 16 1
      src/Avalonia.Diagnostics/Diagnostics/ViewModels/MainViewModel.cs
  26. 114 72
      src/Avalonia.Diagnostics/Diagnostics/Views/ControlDetailsView.xaml
  27. 103 32
      src/Avalonia.Diagnostics/Diagnostics/Views/EventsPageView.xaml
  28. 52 5
      src/Avalonia.Diagnostics/Diagnostics/Views/EventsPageView.xaml.cs
  29. 8 13
      src/Avalonia.Diagnostics/Diagnostics/Views/ThicknessEditor.cs
  30. 22 0
      src/Avalonia.Headless/HeadlessPlatformRenderInterface.cs
  31. 9 0
      src/Avalonia.Layout/WrapLayout/WrapLayout.cs
  32. 27 12
      src/Avalonia.Styling/Controls/Classes.cs
  33. 15 0
      src/Avalonia.Themes.Fluent/Accents/AccentColors.xaml
  34. 15 1
      src/Avalonia.Themes.Fluent/Accents/Base.xaml
  35. 29 195
      src/Avalonia.Themes.Fluent/Accents/BaseDark.xaml
  36. 31 193
      src/Avalonia.Themes.Fluent/Accents/BaseLight.xaml
  37. 0 455
      src/Avalonia.Themes.Fluent/Accents/FluentBaseDark.xaml
  38. 0 458
      src/Avalonia.Themes.Fluent/Accents/FluentBaseLight.xaml
  39. 51 294
      src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml
  40. 50 297
      src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml
  41. 7 1
      src/Avalonia.Themes.Fluent/Controls/ContextMenu.xaml
  42. 6 8
      src/Avalonia.Themes.Fluent/Controls/DataValidationErrors.xaml
  43. 1 1
      src/Avalonia.Themes.Fluent/Controls/EmbeddableControlRoot.xaml
  44. 204 113
      src/Avalonia.Themes.Fluent/Controls/Expander.xaml
  45. 0 1
      src/Avalonia.Themes.Fluent/Controls/FlyoutPresenter.xaml
  46. 0 1
      src/Avalonia.Themes.Fluent/Controls/Menu.xaml
  47. 1 2
      src/Avalonia.Themes.Fluent/Controls/MenuItem.xaml
  48. 1 1
      src/Avalonia.Themes.Fluent/Controls/Window.xaml
  49. 2 2
      src/Avalonia.Themes.Fluent/FluentDark.xaml
  50. 1 1
      src/Avalonia.Themes.Fluent/FluentLight.xaml
  51. 69 0
      src/Avalonia.Visuals/Animation/Animators/BaseBrushAnimator.cs
  52. 6 1
      src/Avalonia.Visuals/Animation/Animators/ColorAnimator.cs
  53. 20 49
      src/Avalonia.Visuals/Animation/Animators/SolidColorBrushAnimator.cs
  54. 23 0
      src/Avalonia.Visuals/Animation/Transitions/BoxShadowsTransition.cs
  55. 5 16
      src/Avalonia.Visuals/Animation/Transitions/CornerRadiusTransition.cs
  56. 5 5
      src/Avalonia.Visuals/Animation/Transitions/PointTransition.cs
  57. 5 5
      src/Avalonia.Visuals/Animation/Transitions/SizeTransition.cs
  58. 5 5
      src/Avalonia.Visuals/Animation/Transitions/ThicknessTransition.cs
  59. 5 5
      src/Avalonia.Visuals/Animation/Transitions/VectorTransition.cs
  60. 5 0
      src/Avalonia.Visuals/ApiCompatBaseline.txt
  61. 2 0
      src/Avalonia.Visuals/Media/Brush.cs
  62. 45 0
      src/Avalonia.Visuals/Media/Imaging/WriteableBitmap.cs
  63. 1 2
      src/Avalonia.Visuals/Media/SolidColorBrush.cs
  64. 1 1
      src/Avalonia.Visuals/Media/TextFormatting/TextFormatterImpl.cs
  65. 32 0
      src/Avalonia.Visuals/Platform/IPlatformRenderInterface.cs
  66. 1 4
      src/Avalonia.Visuals/Rendering/ICustomSimpleHitTest.cs
  67. 1 1
      src/Avalonia.Visuals/Rendering/ImmediateRenderer.cs
  68. 3 3
      src/Avalonia.Visuals/Rendering/SceneGraph/Scene.cs
  69. 13 9
      src/Skia/Avalonia.Skia/DrawingContextImpl.cs
  70. 25 0
      src/Skia/Avalonia.Skia/PlatformRenderInterface.cs
  71. 65 0
      src/Skia/Avalonia.Skia/WriteableBitmapImpl.cs
  72. 22 0
      src/Windows/Avalonia.Direct2D1/Direct2D1Platform.cs
  73. 17 0
      src/Windows/Avalonia.Direct2D1/Media/Imaging/WriteableWicBitmapImpl.cs
  74. 22 0
      tests/Avalonia.Benchmarks/NullRenderingPlatform.cs
  75. 63 0
      tests/Avalonia.Benchmarks/Themes/ThemeBenchmark.cs
  76. 56 0
      tests/Avalonia.Controls.UnitTests/ViewboxTests.cs
  77. 30 0
      tests/Avalonia.Skia.UnitTests/DrawingContextImplTests.cs
  78. 18 0
      tests/Avalonia.Skia.UnitTests/Media/TextFormatting/TextFormatterTests.cs
  79. 22 0
      tests/Avalonia.UnitTests/MockPlatformRenderInterface.cs
  80. 17 0
      tests/Avalonia.Visuals.UnitTests/Rendering/CustomHitTestBorder.cs
  81. 40 3
      tests/Avalonia.Visuals.UnitTests/Rendering/DeferredRendererTests_HitTesting.cs
  82. 37 0
      tests/Avalonia.Visuals.UnitTests/Rendering/ImmediateRendererTests_HitTesting.cs
  83. 22 0
      tests/Avalonia.Visuals.UnitTests/VisualTree/MockRenderInterface.cs

+ 18 - 4
Documentation/build.md

@@ -9,10 +9,24 @@ git clone https://github.com/AvaloniaUI/Avalonia.git
 git submodule update --init
 ```
 
+### Install the required version of the .NET Core SDK
+
+Go to https://dotnet.microsoft.com/download/visual-studio-sdks and install the latest version of the .NET Core SDK compatible with Avalonia UI. Make sure to download the SDK (not just the "runtime") package. The version compatible is indicated within the [global.json](https://github.com/AvaloniaUI/Avalonia/blob/master/global.json) file. Note that Avalonia UI does not always use the latest version and is hardcoded to use the last version known to be compatible (SDK releases may break the builds from time-to-time).
+
 ###  Open in Visual Studio
 
-Open the `Avalonia.sln` solution in Visual Studio 2019 or newer. The free Visual Studio Community
-edition works fine. Run the `Samples\ControlCatalog.Desktop` project to see the sample application.
+Open the `Avalonia.sln` solution in Visual Studio 2019 or newer. The free Visual Studio Community edition works fine. Build and run the `Samples\ControlCatalog.Desktop` or `ControlCatalog.NetCore` project to see the sample application.
+
+### Troubleshooting
+
+ * **Error CS0006: Avalonia.DesktopRuntime.dll could not be found**
+
+    It is common for the first build to fail with the errors below (also discussed in [#4257](https://github.com/AvaloniaUI/Avalonia/issues/4257)).
+    ```
+    >CSC : error CS0006: Metadata file 'C:\...\Avalonia\src\Avalonia.DesktopRuntime\bin\Debug\netcoreapp2.0\Avalonia.DesktopRuntime.dll' could not be found
+    >CSC : error CS0006: Metadata file 'C:\...\Avalonia\packages\Avalonia\bin\Debug\netcoreapp2.0\Avalonia.dll' could not be found
+    ```
+    To correct this, right click on the `Avalonia.DesktopRuntime` project then press `Build` to build the project manually. Afterwards the solution should build normally and the ControlCatalog can be run.
 
 # Linux/macOS
 
@@ -20,9 +34,9 @@ It's *not* possible to build the *whole* project on Linux/macOS. You can only bu
 
 MonoDevelop, Xamarin Studio and Visual Studio for Mac aren't capable of properly opening our solution. You can use Rider (at least 2017.2 EAP) or VSCode instead. They will fail to load most of platform specific projects, but you don't need them to run on .NET Core.
 
-###  Install the latest version of .NET Core
+###  Install the latest version of the .NET Core SDK
 
-Go to https://www.microsoft.com/net/core and follow instructions for your OS. You need SDK (not just "runtime") package.
+Go to https://www.microsoft.com/net/core and follow the instructions for your OS. Make sure to download the SDK (not just the "runtime") package.
 
 ###  Additional requirements for macOS
 

+ 8 - 0
samples/ControlCatalog/App.xaml.cs

@@ -39,6 +39,10 @@ namespace ControlCatalog
 
         public static Styles DefaultLight = new Styles
         {
+            new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog"))
+            {
+                Source = new Uri("avares://Avalonia.Themes.Fluent/Accents/AccentColors.xaml")
+            },
             new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog"))
             {
                 Source = new Uri("avares://Avalonia.Themes.Fluent/Accents/Base.xaml")
@@ -60,6 +64,10 @@ namespace ControlCatalog
 
         public static Styles DefaultDark = new Styles
         {
+            new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog"))
+            {
+                Source = new Uri("avares://Avalonia.Themes.Fluent/Accents/AccentColors.xaml")
+            },
             new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog"))
             {
                 Source = new Uri("avares://Avalonia.Themes.Fluent/Accents/Base.xaml")

+ 23 - 53
samples/ControlCatalog/Pages/ViewboxPage.xaml

@@ -1,66 +1,36 @@
 <UserControl xmlns="https://github.com/avaloniaui"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              x:Class="ControlCatalog.Pages.ViewboxPage">
-    <UserControl.Resources>
-        <StreamGeometry x:Key="Acorn">
-            F1 M 16.6309,18.6563C 17.1309,
-            8.15625 29.8809,14.1563 29.8809,
-            14.1563C 30.8809,11.1563 34.1308,
-            11.4063 34.1308,11.4063C 33.5,12
-            34.6309,13.1563 34.6309,13.1563C
-            32.1309,13.1562 31.1309,14.9062
-            31.1309,14.9062C 41.1309,23.9062
-            32.6309,27.9063 32.6309,27.9062C
-            24.6309,24.9063 21.1309,22.1562
-            16.6309,18.6563 Z M 16.6309,19.9063C
-            21.6309,24.1563 25.1309,26.1562
-            31.6309,28.6562C 31.6309,28.6562
-            26.3809,39.1562 18.3809,36.1563C
-            18.3809,36.1563 18,38 16.3809,36.9063C
-            15,36 16.3809,34.9063 16.3809,34.9063C
-            16.3809,34.9063 10.1309,30.9062 16.6309,19.9063 Z
-        </StreamGeometry>
-    </UserControl.Resources>
 
-    <Grid RowDefinitions="Auto,*">
+    <Grid RowDefinitions="Auto,*,*">
         <StackPanel Orientation="Vertical" Spacing="4">
             <TextBlock Classes="h1">Viewbox</TextBlock>
             <TextBlock Classes="h2">A control used to scale single child.</TextBlock>
         </StackPanel>
-        <Grid ColumnDefinitions="Auto,*,*"
-              RowDefinitions="*,*,*,*"
-              Grid.Row="1" Margin="48"
-              MaxWidth="400">
-            <TextBlock Grid.Row="0" VerticalAlignment="Center">None</TextBlock>
-            <TextBlock Grid.Row="1" VerticalAlignment="Center">Fill</TextBlock>
-            <TextBlock Grid.Row="2" VerticalAlignment="Center">Uniform</TextBlock>
-            <TextBlock Grid.Row="3" VerticalAlignment="Center">UniformToFill</TextBlock>
 
-            <Viewbox Grid.Row="0" Grid.Column="1" Stretch="None">
-                <TextBlock>Hello World!</TextBlock>
-            </Viewbox>
-            <Viewbox Grid.Row="1" Grid.Column="1" Stretch="Fill">
-                <TextBlock>Hello World!</TextBlock>
-            </Viewbox>
-            <Viewbox Grid.Row="2" Grid.Column="1" Stretch="Uniform">
-                <TextBlock>Hello World!</TextBlock>
-            </Viewbox>
-            <Viewbox Grid.Row="3" Grid.Column="1" Stretch="UniformToFill">
-                <TextBlock>Hello World!</TextBlock>
-            </Viewbox>
+        <Grid Grid.Row="1" ColumnDefinitions="*,Auto" HorizontalAlignment="Center" Margin="0,10,0,0">
 
-            <Viewbox Grid.Row="0" Grid.Column="2" Stretch="None">
-                <Path Fill="Blue" Data="{StaticResource Acorn}"/>
-            </Viewbox>
-            <Viewbox Grid.Row="1" Grid.Column="2" Stretch="Fill">
-                <Path Fill="Blue" Data="{StaticResource Acorn}"/>
-            </Viewbox>
-            <Viewbox Grid.Row="2" Grid.Column="2" Stretch="Uniform">
-                <Path Fill="Blue" Data="{StaticResource Acorn}"/>
-            </Viewbox>
-            <Viewbox Grid.Row="3" Grid.Column="2" Stretch="UniformToFill">
-                <Path Fill="Blue" Data="{StaticResource Acorn}"/>
-            </Viewbox>
+          <Border HorizontalAlignment="Center" Grid.Column="0" BorderThickness="1" BorderBrush="Orange" Width="200" Height="200">
+            <Border VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="0" BorderThickness="1" BorderBrush="CornflowerBlue" Width="{Binding #WidthSlider.Value}" Height="{Binding #HeightSlider.Value}" >
+              <Viewbox
+                  Stretch="{Binding #StretchSelector.SelectedItem}"
+                  StretchDirection="{Binding #StretchDirectionSelector.SelectedItem}">
+                <Ellipse Width="50" Height="50" Fill="CornflowerBlue" />
+              </Viewbox>
+            </Border>
+          </Border>
+
+          <StackPanel HorizontalAlignment="Left" Orientation="Vertical" Grid.Column="1" Margin="8,0,0,0" Width="150">
+            <TextBlock Text="Width" />
+            <Slider Minimum="10" Maximum="200" Value="100" x:Name="WidthSlider" TickFrequency="25" TickPlacement="TopLeft" />
+            <TextBlock Text="Height" />
+            <Slider Minimum="10" Maximum="200" Value="100" x:Name="HeightSlider" TickFrequency="25" TickPlacement="TopLeft" />
+            <TextBlock Text="Stretch" />
+            <ComboBox x:Name="StretchSelector" HorizontalAlignment="Stretch" Margin="0,0,0,2" />
+            <TextBlock Text="Stretch Direction" />
+            <ComboBox x:Name="StretchDirectionSelector" HorizontalAlignment="Stretch" />
+          </StackPanel>
         </Grid>
+
     </Grid>
 </UserControl>

+ 20 - 1
samples/ControlCatalog/Pages/ViewboxPage.xaml.cs

@@ -1,5 +1,6 @@
 using Avalonia.Controls;
 using Avalonia.Markup.Xaml;
+using Avalonia.Media;
 
 namespace ControlCatalog.Pages
 {
@@ -7,7 +8,25 @@ namespace ControlCatalog.Pages
     {
         public ViewboxPage()
         {
-            this.InitializeComponent();
+            InitializeComponent();
+
+            var stretchSelector = this.FindControl<ComboBox>("StretchSelector");
+
+            stretchSelector.Items = new[]
+            {
+                Stretch.Uniform, Stretch.UniformToFill, Stretch.Fill, Stretch.None
+            };
+
+            stretchSelector.SelectedIndex = 0;
+
+            var stretchDirectionSelector = this.FindControl<ComboBox>("StretchDirectionSelector");
+
+            stretchDirectionSelector.Items = new[]
+            {
+                StretchDirection.Both, StretchDirection.DownOnly, StretchDirection.UpOnly
+            };
+
+            stretchDirectionSelector.SelectedIndex = 0;
         }
 
         private void InitializeComponent()

+ 4 - 3
samples/RenderDemo/Pages/AnimationsPage.xaml

@@ -1,7 +1,8 @@
 <UserControl 
   xmlns="https://github.com/avaloniaui" 
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
-  x:Class="RenderDemo.Pages.AnimationsPage">
+  x:Class="RenderDemo.Pages.AnimationsPage"
+  MaxWidth="600">
   <UserControl.Styles>
     <Styles>
       <Styles.Resources>
@@ -167,8 +168,8 @@
       <StackPanel.Clock>
         <Clock />
       </StackPanel.Clock>
-      <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
-        <TextBlock VerticalAlignment="Center">Hover to activate Transform Keyframe Animations.</TextBlock>
+      <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Spacing="20">
+        <TextBlock VerticalAlignment="Center">Hover to activate Keyframe Animations.</TextBlock>
         <Button Content="{Binding PlayStateText}" Command="{Binding TogglePlayState}" Click="ToggleClock" />
       </StackPanel>
       <WrapPanel ClipToBounds="False">

+ 61 - 4
samples/RenderDemo/Pages/TransitionsPage.xaml

@@ -1,7 +1,8 @@
 <UserControl 
   xmlns="https://github.com/avaloniaui" 
-  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
-  x:Class="RenderDemo.Pages.TransitionsPage">
+  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+  x:Class="RenderDemo.Pages.TransitionsPage"
+  MaxWidth="600">
   <UserControl.Styles>
     <Styles>
       <Styles.Resources>
@@ -90,6 +91,56 @@
         <Setter Property="RenderTransform" Value="none" />
       </Style>
 
+      <Style Selector="Border.Rect7">
+        <Setter Property="Transitions">
+          <Transitions>
+            <DoubleTransition Property="Height" Duration="0:0:0.5" />
+          </Transitions>
+        </Setter>
+      </Style>
+
+      <Style Selector="Border.Rect7:pointerover">
+        <Setter Property="Height" Value="50" />
+      </Style>
+
+      <Style Selector="Border.Rect8">
+        <Setter Property="Transitions">
+          <Transitions>
+            <CornerRadiusTransition Property="CornerRadius" Duration="0:0:0.5" />
+          </Transitions>
+        </Setter>
+      </Style>
+
+      <Style Selector="Border.Rect8:pointerover">
+        <Setter Property="CornerRadius" Value="50" />
+      </Style>
+
+      <Style Selector="Border.Rect9">
+        <Setter Property="Transitions">
+          <Transitions>
+            <ThicknessTransition Property="Padding" Duration="0:0:0.5" />
+          </Transitions>
+        </Setter>
+      </Style>
+
+      <Style Selector="Border.Rect9:pointerover">
+        <Setter Property="Padding" Value="10" />
+      </Style>
+
+      <Style Selector="Border.Shadow">
+        <Setter Property="Background" Value="Transparent"/>        
+        <Setter Property="BorderBrush" Value="Black"/>
+        <Setter Property="BorderThickness" Value="1"/>
+        <Setter Property="BoxShadow" Value="inset 0 0 0 2 Red, -15 -15 Green"/>
+        <Setter Property="Transitions">
+          <Transitions>
+            <BoxShadowsTransition Property="BoxShadow" Duration="0:0:0.5" />
+          </Transitions>
+        </Setter>
+      </Style>
+      <Style Selector="Border.Shadow:pointerover">
+        <Setter Property="BoxShadow" Value="inset 30 30 20 30 Green, 20 40 20 10 Red"/>
+      </Style>
     </Styles>
   </UserControl.Styles>
 
@@ -98,8 +149,8 @@
       <StackPanel.Clock>
         <Clock />
       </StackPanel.Clock>
-      <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
-        <TextBlock VerticalAlignment="Center">Hover to activate Transform Keyframe Animations.</TextBlock>
+      <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Spacing="20">
+        <TextBlock VerticalAlignment="Center">Hover to activate Transitions.</TextBlock>
         <Button Content="{Binding PlayStateText}" Command="{Binding TogglePlayState}" Click="ToggleClock" />
       </StackPanel>
       <WrapPanel ClipToBounds="False">
@@ -109,6 +160,12 @@
         <Border Classes="Test Rect4" Background="Navy"/>
         <Border Classes="Test Rect5" Background="SeaGreen"/>
         <Border Classes="Test Rect6" Background="Orange"/>
+        <Border Classes="Test Rect7" Background="Gold"/>
+        <Border Classes="Test Rect8" Background="Gray" />
+        <Border Classes="Test Rect9" Background="Red" />
+
+        <Border Classes="Test Shadow" CornerRadius="10" Child="{x:Null}" />
+        <Border Classes="Test Shadow" CornerRadius="0 30 60 0" Child="{x:Null}" />
       </WrapPanel>
     </StackPanel>
   </Grid>

+ 11 - 0
src/Avalonia.Animation/Animation.cs

@@ -209,6 +209,17 @@ namespace Avalonia.Animation
             ( prop => typeof(decimal).IsAssignableFrom(prop.PropertyType), typeof(DecimalAnimator) ),
         };
 
+        /// <summary>
+        /// Registers a <see cref="Animator{T}"/> that can handle
+        /// a value type that matches the specified condition.
+        /// </summary>
+        /// <param name="condition">
+        /// The condition to which the <see cref="Animator{T}"/>
+        /// is to be activated and used.
+        /// </param>
+        /// <typeparam name="TAnimator">
+        /// The type of the animator to instantiate.
+        /// </typeparam>
         public static void RegisterAnimator<TAnimator>(Func<AvaloniaProperty, bool> condition)
             where TAnimator : IAnimator
         {

+ 7 - 1
src/Avalonia.Animation/Animators/Animator`1.cs

@@ -104,6 +104,11 @@ namespace Avalonia.Animation.Animators
             throw new Exception("Index time is out of keyframe time range.");
         }
 
+        public virtual IDisposable BindAnimation(Animatable control, IObservable<T> instance)
+        {
+            return control.Bind((AvaloniaProperty<T>)Property, instance, BindingPriority.Animation);
+        }
+
         /// <summary>
         /// Runs the KeyFrames Animation.
         /// </summary>
@@ -116,7 +121,8 @@ namespace Avalonia.Animation.Animators
                 clock ?? control.Clock ?? Clock.GlobalClock,
                 onComplete,
                 InterpolationHandler);
-            return control.Bind<T>((AvaloniaProperty<T>)Property, instance, BindingPriority.Animation);
+            
+            return BindAnimation(control, instance);
         }
 
         /// <summary>

+ 5 - 5
src/Avalonia.Animation/Transitions/DoubleTransition.cs

@@ -1,6 +1,8 @@
 using System;
 using System.Reactive.Linq;
 
+using Avalonia.Animation.Animators;
+
 namespace Avalonia.Animation
 {
     /// <summary>
@@ -8,15 +10,13 @@ namespace Avalonia.Animation
     /// </summary>  
     public class DoubleTransition : Transition<double>
     {
+        private static readonly DoubleAnimator s_animator = new DoubleAnimator();
+
         /// <inheritdocs/>
         public override IObservable<double> DoTransition(IObservable<double> progress, double oldValue, double newValue)
         {
             return progress
-                .Select(p =>
-                {
-                    var f = Easing.Ease(p);
-                    return ((newValue - oldValue) * f) + oldValue;
-                });
+                .Select(progress => s_animator.Interpolate(Easing.Ease(progress), oldValue, newValue));
         }
     }
 }

+ 5 - 2
src/Avalonia.Animation/Transitions/FloatTransition.cs

@@ -1,6 +1,8 @@
 using System;
 using System.Reactive.Linq;
 
+using Avalonia.Animation.Animators;
+
 namespace Avalonia.Animation
 {
     /// <summary>
@@ -8,12 +10,13 @@ namespace Avalonia.Animation
     /// </summary>  
     public class FloatTransition : Transition<float>
     {
+        private static readonly FloatAnimator s_animator = new FloatAnimator();
+
         /// <inheritdocs/>
         public override IObservable<float> DoTransition(IObservable<double> progress, float oldValue, float newValue)
         {
-            var delta = newValue - oldValue;
             return progress
-                .Select(p => (float)Easing.Ease(p) * delta + oldValue);
+                .Select(progress => s_animator.Interpolate(Easing.Ease(progress), oldValue, newValue));
         }
     }
 }

+ 5 - 2
src/Avalonia.Animation/Transitions/IntegerTransition.cs

@@ -1,6 +1,8 @@
 using System;
 using System.Reactive.Linq;
 
+using Avalonia.Animation.Animators;
+
 namespace Avalonia.Animation
 {
     /// <summary>
@@ -8,12 +10,13 @@ namespace Avalonia.Animation
     /// </summary>  
     public class IntegerTransition : Transition<int>
     {
+        private static readonly Int32Animator s_animator = new Int32Animator();
+
         /// <inheritdocs/>
         public override IObservable<int> DoTransition(IObservable<double> progress, int oldValue, int newValue)
         {
-            var delta = newValue - oldValue;
             return progress
-                .Select(p => (int)(Easing.Ease(p) * delta + oldValue));
+                .Select(progress => s_animator.Interpolate(Easing.Ease(progress), oldValue, newValue));
         }
     }
 }

+ 1 - 1
src/Avalonia.Base/PropertyStore/BindingEntry.cs

@@ -79,7 +79,7 @@ namespace Avalonia.PropertyStore
 
         public void OnError(Exception error)
         {
-            throw new NotImplementedException();
+            throw new NotImplementedException("BindingEntry.OnError is not implemented", error);
         }
 
         public void OnNext(BindingValue<T> value)

+ 4 - 2
src/Avalonia.Controls.DataGrid/DataGrid.cs

@@ -535,7 +535,8 @@ namespace Avalonia.Controls
             AvaloniaProperty.RegisterDirect<DataGrid, int>(
                 nameof(SelectedIndex),
                 o => o.SelectedIndex,
-                (o, v) => o.SelectedIndex = v);
+                (o, v) => o.SelectedIndex = v,
+                defaultBindingMode: BindingMode.TwoWay);
 
         /// <summary>
         /// Gets or sets the index of the current selection.
@@ -553,7 +554,8 @@ namespace Avalonia.Controls
             AvaloniaProperty.RegisterDirect<DataGrid, object>(
                 nameof(SelectedItem),
                 o => o.SelectedItem,
-                (o, v) => o.SelectedItem = v);
+                (o, v) => o.SelectedItem = v,
+                defaultBindingMode: BindingMode.TwoWay);
 
         /// <summary>
         /// Gets or sets the data item corresponding to the selected row.

+ 2 - 1
src/Avalonia.Controls/ApiCompatBaseline.txt

@@ -4,10 +4,11 @@ InterfacesShouldHaveSameMembers : Interface member 'public System.Boolean Avalon
 InterfacesShouldHaveSameMembers : Interface member 'public void Avalonia.Controls.IMenuItem.StaysOpenOnClick.set(System.Boolean)' is present in the implementation but not in the contract.
 InterfacesShouldHaveSameMembers : Interface member 'public void Avalonia.Controls.INativeMenuExporterEventsImplBridge.RaiseClosed()' is present in the implementation but not in the contract.
 InterfacesShouldHaveSameMembers : Interface member 'public void Avalonia.Controls.INativeMenuExporterEventsImplBridge.RaiseOpening()' is present in the implementation but not in the contract.
+MembersMustExist : Member 'public Avalonia.AvaloniaProperty<Avalonia.Media.Stretch> Avalonia.AvaloniaProperty<Avalonia.Media.Stretch> Avalonia.Controls.Viewbox.StretchProperty' does not exist in the implementation but it does exist in the contract.
 MembersMustExist : Member 'public void Avalonia.Controls.Embedding.Offscreen.OffscreenTopLevelImplBase.SetCursor(Avalonia.Platform.IPlatformHandle)' does not exist in the implementation but it does exist in the contract.
 MembersMustExist : Member 'public Avalonia.AvaloniaProperty Avalonia.AvaloniaProperty Avalonia.Controls.Notifications.NotificationCard.CloseOnClickProperty' does not exist in the implementation but it does exist in the contract.
 EnumValuesMustMatch : Enum value 'Avalonia.Platform.ExtendClientAreaChromeHints Avalonia.Platform.ExtendClientAreaChromeHints.Default' is (System.Int32)2 in the implementation but (System.Int32)1 in the contract.
 InterfacesShouldHaveSameMembers : Interface member 'public void Avalonia.Platform.ITopLevelImpl.SetCursor(Avalonia.Platform.ICursorImpl)' is present in the implementation but not in the contract.
 InterfacesShouldHaveSameMembers : Interface member 'public void Avalonia.Platform.ITopLevelImpl.SetCursor(Avalonia.Platform.IPlatformHandle)' is present in the contract but not in the implementation.
 MembersMustExist : Member 'public void Avalonia.Platform.ITopLevelImpl.SetCursor(Avalonia.Platform.IPlatformHandle)' does not exist in the implementation but it does exist in the contract.
-Total Issues: 11
+Total Issues: 12

+ 4 - 2
src/Avalonia.Controls/Image.cs

@@ -1,5 +1,6 @@
 using Avalonia.Media;
 using Avalonia.Media.Imaging;
+using Avalonia.Metadata;
 
 namespace Avalonia.Controls
 {   
@@ -30,13 +31,14 @@ namespace Avalonia.Controls
 
         static Image()
         {
-            AffectsRender<Image>(SourceProperty, StretchProperty);
-            AffectsMeasure<Image>(SourceProperty, StretchProperty);
+            AffectsRender<Image>(SourceProperty, StretchProperty, StretchDirectionProperty);
+            AffectsMeasure<Image>(SourceProperty, StretchProperty, StretchDirectionProperty);
         }
 
         /// <summary>
         /// Gets or sets the image that will be displayed.
         /// </summary>
+        [Content]
         public IImage Source
         {
             get { return GetValue(SourceProperty); }

+ 29 - 58
src/Avalonia.Controls/Viewbox.cs

@@ -1,40 +1,48 @@
-using System;
-using Avalonia.Media;
+using Avalonia.Media;
 
 namespace Avalonia.Controls
 {
     /// <summary>
-    /// Viewbox is used to scale single child.
+    /// Viewbox is used to scale single child to fit in the available space.
     /// </summary>
     /// <seealso cref="Avalonia.Controls.Decorator" />
     public class Viewbox : Decorator
     {
         /// <summary>
-        /// The stretch property
+        /// Defines the <see cref="Stretch"/> property.
         /// </summary>
-        public static readonly AvaloniaProperty<Stretch> StretchProperty =
-                AvaloniaProperty.RegisterDirect<Viewbox, Stretch>(nameof(Stretch),
-                    v => v.Stretch, (c, v) => c.Stretch = v, Stretch.Uniform);
+        public static readonly StyledProperty<Stretch> StretchProperty =
+            AvaloniaProperty.Register<Image, Stretch>(nameof(Stretch), Stretch.Uniform);
 
-        private Stretch _stretch = Stretch.Uniform;
+        /// <summary>
+        /// Defines the <see cref="StretchDirection"/> property.
+        /// </summary>
+        public static readonly StyledProperty<StretchDirection> StretchDirectionProperty =
+            AvaloniaProperty.Register<Viewbox, StretchDirection>(nameof(StretchDirection), StretchDirection.Both);
+
+        static Viewbox()
+        {
+            ClipToBoundsProperty.OverrideDefaultValue<Viewbox>(true);
+            AffectsMeasure<Viewbox>(StretchProperty, StretchDirectionProperty);
+        }
 
         /// <summary>
         /// Gets or sets the stretch mode, 
         /// which determines how child fits into the available space.
         /// </summary>
-        /// <value>
-        /// The stretch.
-        /// </value>
         public Stretch Stretch
         {
-            get => _stretch;
-            set => SetAndRaise(StretchProperty, ref _stretch, value);
+            get => GetValue(StretchProperty);
+            set => SetValue(StretchProperty, value);
         }
 
-        static Viewbox()
+        /// <summary>
+        /// Gets or sets a value controlling in what direction contents will be stretched.
+        /// </summary>
+        public StretchDirection StretchDirection
         {
-            ClipToBoundsProperty.OverrideDefaultValue<Viewbox>(true);
-            AffectsMeasure<Viewbox>(StretchProperty);
+            get => GetValue(StretchDirectionProperty);
+            set => SetValue(StretchDirectionProperty, value);
         }
 
         protected override Size MeasureOverride(Size availableSize)
@@ -47,9 +55,9 @@ namespace Avalonia.Controls
 
                 var childSize = child.DesiredSize;
 
-                var scale = GetScale(availableSize, childSize, Stretch);
+                var size = Stretch.CalculateSize(availableSize, childSize, StretchDirection);
 
-                return (childSize * scale).Constrain(availableSize);
+                return size.Constrain(availableSize);
             }
 
             return new Size();
@@ -62,7 +70,9 @@ namespace Avalonia.Controls
             if (child != null)
             {
                 var childSize = child.DesiredSize;
-                var scale = GetScale(finalSize, childSize, Stretch);
+                var scale = Stretch.CalculateScaling(finalSize, childSize, StretchDirection);
+
+                // TODO: Viewbox should have another decorator as a child so we won't affect other render transforms.
                 var scaleTransform = child.RenderTransform as ScaleTransform;
 
                 if (scaleTransform == null)
@@ -81,44 +91,5 @@ namespace Avalonia.Controls
 
             return new Size();
         }
-
-        private static Vector GetScale(Size availableSize, Size childSize, Stretch stretch)
-        {
-            double scaleX = 1.0;
-            double scaleY = 1.0;
-
-            bool validWidth = !double.IsPositiveInfinity(availableSize.Width);
-            bool validHeight = !double.IsPositiveInfinity(availableSize.Height);
-
-            if (stretch != Stretch.None && (validWidth || validHeight))
-            {
-                scaleX = childSize.Width <= 0.0 ? 0.0 : availableSize.Width / childSize.Width;
-                scaleY = childSize.Height <= 0.0 ? 0.0 : availableSize.Height / childSize.Height;
-
-                if (!validWidth)
-                {
-                    scaleX = scaleY;
-                }
-                else if (!validHeight)
-                {
-                    scaleY = scaleX;
-                }
-                else
-                {
-                    switch (stretch)
-                    {
-                        case Stretch.Uniform:
-                            scaleX = scaleY = Math.Min(scaleX, scaleY);
-                            break;
-
-                        case Stretch.UniformToFill:
-                            scaleX = scaleY = Math.Max(scaleX, scaleY);
-                            break;
-                    }
-                }
-            }
-
-            return new Vector(scaleX, scaleY);
-        }
     }
 }

+ 0 - 22
src/Avalonia.Diagnostics/Diagnostics/Converters/BoolToBrushConverter.cs

@@ -1,22 +0,0 @@
-using System;
-using System.Globalization;
-using Avalonia.Data.Converters;
-using Avalonia.Media;
-
-namespace Avalonia.Diagnostics.Converters
-{
-    internal class BoolToBrushConverter : IValueConverter
-    {
-        public IBrush Brush { get; set; }
-
-        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
-        {
-            return (bool)value ? Brush : Brushes.Transparent;
-        }
-
-        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
-        {
-            throw new NotImplementedException();
-        }
-    }
-}

+ 2 - 0
src/Avalonia.Diagnostics/Diagnostics/Models/EventChainLink.cs

@@ -16,6 +16,8 @@ namespace Avalonia.Diagnostics.Models
 
         public object Handler { get; }
 
+        public bool BeginsNewRoute { get; set; }
+
         public string HandlerName
         {
             get

+ 23 - 6
src/Avalonia.Diagnostics/Diagnostics/ViewModels/ControlLayoutViewModel.cs

@@ -1,4 +1,6 @@
+using System;
 using System.ComponentModel;
+using System.Text;
 using Avalonia.Controls;
 using Avalonia.Layout;
 using Avalonia.VisualTree;
@@ -95,12 +97,27 @@ namespace Avalonia.Diagnostics.ViewModels
             {
                 string CreateConstraintInfo(StyledProperty<double> minProperty, StyledProperty<double> maxProperty)
                 {
-                    if (ao.IsSet(minProperty) || ao.IsSet(maxProperty))
+                    bool hasMin = ao.IsSet(minProperty);
+                    bool hasMax = ao.IsSet(maxProperty);
+
+                    if (hasMin || hasMax)
                     {
-                        var minValue = ao.GetValue(minProperty);
-                        var maxValue = ao.GetValue(maxProperty);
+                        var builder = new StringBuilder();
+
+                        if (hasMin)
+                        {
+                            var minValue = ao.GetValue(minProperty);
+                            builder.AppendFormat("Min: {0}", Math.Round(minValue, 2));
+                            builder.AppendLine();
+                        }
+
+                        if (hasMax)
+                        {
+                            var maxValue = ao.GetValue(maxProperty);
+                            builder.AppendFormat("Max: {0}", Math.Round(maxValue, 2));
+                        }
 
-                        return $"{minValue} < size < {maxValue}";
+                        return builder.ToString();
                     }
 
                     return null;
@@ -183,8 +200,8 @@ namespace Avalonia.Diagnostics.ViewModels
         {
             var size = _control.Bounds;
 
-            Width = size.Width;
-            Height = size.Height;
+            Width = Math.Round(size.Width, 2);
+            Height = Math.Round(size.Height, 2);
         }
     }
 }

+ 1 - 9
src/Avalonia.Diagnostics/Diagnostics/ViewModels/EventOwnerTreeNode.cs

@@ -2,25 +2,17 @@
 using System.Collections.Generic;
 using System.Linq;
 using Avalonia.Collections;
-using Avalonia.Controls;
-using Avalonia.Input;
 using Avalonia.Interactivity;
 
 namespace Avalonia.Diagnostics.ViewModels
 {
     internal class EventOwnerTreeNode : EventTreeNodeBase
     {
-        private static readonly RoutedEvent[] s_defaultEvents =
-        {
-            Button.ClickEvent, InputElement.KeyDownEvent, InputElement.KeyUpEvent, InputElement.TextInputEvent,
-            InputElement.PointerReleasedEvent, InputElement.PointerPressedEvent
-        };
-
         public EventOwnerTreeNode(Type type, IEnumerable<RoutedEvent> events, EventsPageViewModel vm)
             : base(null, type.Name)
         {
             Children = new AvaloniaList<EventTreeNodeBase>(events.OrderBy(e => e.Name)
-                .Select(e => new EventTreeNode(this, e, vm) { IsEnabled = s_defaultEvents.Contains(e) }));
+                .Select(e => new EventTreeNode(this, e, vm)));
             IsExpanded = true;
         }
 

+ 6 - 3
src/Avalonia.Diagnostics/Diagnostics/ViewModels/EventTreeNode.cs

@@ -9,7 +9,6 @@ namespace Avalonia.Diagnostics.ViewModels
 {
     internal class EventTreeNode : EventTreeNodeBase
     {
-        private readonly RoutedEvent _event;
         private readonly EventsPageViewModel _parentViewModel;
         private bool _isRegistered;
         private FiredEvent _currentEvent;
@@ -20,10 +19,12 @@ namespace Avalonia.Diagnostics.ViewModels
             Contract.Requires<ArgumentNullException>(@event != null);
             Contract.Requires<ArgumentNullException>(vm != null);
 
-            _event = @event;
+            Event = @event;
             _parentViewModel = vm;
         }
 
+        public RoutedEvent Event { get; }
+
         public override bool? IsEnabled
         {
             get => base.IsEnabled;
@@ -53,8 +54,10 @@ namespace Avalonia.Diagnostics.ViewModels
         {
             if (IsEnabled.GetValueOrDefault() && !_isRegistered)
             {
+                var allRoutes = RoutingStrategies.Direct | RoutingStrategies.Tunnel | RoutingStrategies.Bubble;
+
                 // FIXME: This leaks event handlers.
-                _event.AddClassHandler(typeof(object), HandleEvent, (RoutingStrategies)7, handledEventsToo: true);
+                Event.AddClassHandler(typeof(object), HandleEvent, allRoutes, handledEventsToo: true);
                 _isRegistered = true;
             }
         }

+ 8 - 0
src/Avalonia.Diagnostics/Diagnostics/ViewModels/EventTreeNodeBase.cs

@@ -8,11 +8,13 @@ namespace Avalonia.Diagnostics.ViewModels
         internal bool _updateParent = true;
         private bool _isExpanded;
         private bool? _isEnabled = false;
+        private bool _isVisible;
 
         protected EventTreeNodeBase(EventTreeNodeBase parent, string text)
         {
             Parent = parent;
             Text = text;
+            IsVisible = true;
         }
 
         public IAvaloniaReadOnlyList<EventTreeNodeBase> Children
@@ -33,6 +35,12 @@ namespace Avalonia.Diagnostics.ViewModels
             set => RaiseAndSetIfChanged(ref _isEnabled, value);
         }
 
+        public bool IsVisible
+        {
+            get => _isVisible;
+            set => RaiseAndSetIfChanged(ref _isVisible, value);
+        }
+
         public EventTreeNodeBase Parent
         {
             get;

+ 153 - 7
src/Avalonia.Diagnostics/Diagnostics/ViewModels/EventsPageViewModel.cs

@@ -1,28 +1,43 @@
 using System;
+using System.Collections.Generic;
 using System.Collections.ObjectModel;
-using System.Globalization;
+using System.ComponentModel;
 using System.Linq;
 using Avalonia.Controls;
-using Avalonia.Data.Converters;
+using Avalonia.Diagnostics.Models;
+using Avalonia.Input;
 using Avalonia.Interactivity;
-using Avalonia.Media;
 
 namespace Avalonia.Diagnostics.ViewModels
 {
     internal class EventsPageViewModel : ViewModelBase
     {
-        private readonly IControl _root;
+        private static readonly HashSet<RoutedEvent> s_defaultEvents = new HashSet<RoutedEvent>()
+        {
+            Button.ClickEvent,
+            InputElement.KeyDownEvent,
+            InputElement.KeyUpEvent,
+            InputElement.TextInputEvent,
+            InputElement.PointerReleasedEvent,
+            InputElement.PointerPressedEvent
+        };
+
+        private readonly MainViewModel _mainViewModel;
+        private string _eventTypeFilter;
         private FiredEvent _selectedEvent;
+        private EventTreeNodeBase _selectedNode;
 
-        public EventsPageViewModel(IControl root)
+        public EventsPageViewModel(MainViewModel mainViewModel)
         {
-            _root = root;
+            _mainViewModel = mainViewModel;
 
             Nodes = RoutedEventRegistry.Instance.GetAllRegistered()
                 .GroupBy(e => e.OwnerType)
                 .OrderBy(e => e.Key.Name)
                 .Select(g => new EventOwnerTreeNode(g.Key, g, this))
                 .ToArray();
+
+            EnableDefault();
         }
 
         public string Name => "Events";
@@ -37,9 +52,140 @@ namespace Avalonia.Diagnostics.ViewModels
             set => RaiseAndSetIfChanged(ref _selectedEvent, value);
         }
 
-        private void Clear()
+        public EventTreeNodeBase SelectedNode
+        {
+            get => _selectedNode;
+            set => RaiseAndSetIfChanged(ref _selectedNode, value);
+        }
+
+        public string EventTypeFilter
+        {
+            get => _eventTypeFilter;
+            set => RaiseAndSetIfChanged(ref _eventTypeFilter, value);
+        }
+
+        public void Clear()
         {
             RecordedEvents.Clear();
         }
+
+        public void DisableAll()
+        {
+            EvaluateNodeEnabled(_ => false);
+        }
+
+        public void EnableDefault()
+        {
+            EvaluateNodeEnabled(node => s_defaultEvents.Contains(node.Event));
+        }
+
+        public void RequestTreeNavigateTo(EventChainLink navTarget)
+        {
+            if (navTarget.Handler is IControl control)
+            {
+                _mainViewModel.RequestTreeNavigateTo(control, true);
+            }
+        }
+
+        public void SelectEventByType(RoutedEvent evt)
+        {
+            foreach (var node in Nodes)
+            {
+                var result = FindNode(node, evt);
+
+                if (result != null && result.IsVisible)
+                {
+                    SelectedNode = result;
+
+                    break;
+                }
+            }
+
+            static EventTreeNodeBase FindNode(EventTreeNodeBase node, RoutedEvent eventType)
+            {
+                if (node is EventTreeNode eventNode && eventNode.Event == eventType)
+                {
+                    return node;
+                }
+
+                if (node.Children != null)
+                {
+                    foreach (var child in node.Children)
+                    {
+                        var result = FindNode(child, eventType);
+
+                        if (result != null)
+                        {
+                            return result;
+                        }
+                    }
+                }
+
+                return null;
+            }
+        }
+
+        protected override void OnPropertyChanged(PropertyChangedEventArgs e)
+        {
+            base.OnPropertyChanged(e);
+
+            if (e.PropertyName == nameof(EventTypeFilter))
+            {
+                UpdateEventFilters();
+            }
+        }
+
+        private void EvaluateNodeEnabled(Func<EventTreeNode, bool> eval)
+        {
+            void ProcessNode(EventTreeNodeBase node)
+            {
+                if (node is EventTreeNode eventNode)
+                {
+                    node.IsEnabled = eval(eventNode);
+                }
+
+                if (node.Children != null)
+                {
+                    foreach (var childNode in node.Children)
+                    {
+                        ProcessNode(childNode);
+                    }
+                }
+            }
+
+            foreach (var node in Nodes)
+            {
+                ProcessNode(node);
+            }
+        }
+
+        private void UpdateEventFilters()
+        {
+            var filter = EventTypeFilter;
+            bool hasFilter = !string.IsNullOrEmpty(filter);
+
+            foreach (var node in Nodes)
+            {
+                FilterNode(node, false);
+            }
+
+            bool FilterNode(EventTreeNodeBase node, bool isParentVisible)
+            {
+                bool matchesFilter = !hasFilter || node.Text.IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0;
+                bool hasVisibleChild = false;
+
+                if (node.Children != null)
+                {
+                    foreach (var childNode in node.Children)
+                    {
+                        hasVisibleChild |= FilterNode(childNode, matchesFilter);
+                    }
+                }
+
+                node.IsVisible = hasVisibleChild || matchesFilter || isParentVisible;
+
+                return node.IsVisible;
+            }
+        }
     }
 }

+ 10 - 5
src/Avalonia.Diagnostics/Diagnostics/ViewModels/FiredEvent.cs

@@ -62,13 +62,18 @@ namespace Avalonia.Diagnostics.ViewModels
             }
         }
 
-        public void AddToChain(object handler, bool handled, RoutingStrategies route)
-        {
-            AddToChain(new EventChainLink(handler, handled, route));
-        }
-
         public void AddToChain(EventChainLink link)
         {
+            if (EventChain.Count > 0)
+            {
+                var prevLink = EventChain[EventChain.Count-1];
+
+                if (prevLink.Route != link.Route)
+                {
+                    link.BeginsNewRoute = true;
+                }
+            }
+
             EventChain.Add(link);
             if (HandledBy == null && link.Handled)
                 HandledBy = link;

+ 16 - 1
src/Avalonia.Diagnostics/Diagnostics/ViewModels/MainViewModel.cs

@@ -4,6 +4,7 @@ using Avalonia.Controls;
 using Avalonia.Diagnostics.Models;
 using Avalonia.Input;
 using Avalonia.Threading;
+using Avalonia.VisualTree;
 
 namespace Avalonia.Diagnostics.ViewModels
 {
@@ -27,7 +28,7 @@ namespace Avalonia.Diagnostics.ViewModels
             _root = root;
             _logicalTree = new TreePageViewModel(this, LogicalTreeNode.Create(root));
             _visualTree = new TreePageViewModel(this, VisualTreeNode.Create(root));
-            _events = new EventsPageViewModel(root);
+            _events = new EventsPageViewModel(this);
 
             UpdateFocusedControl();
             KeyboardDevice.Instance.PropertyChanged += KeyboardPropertyChanged;
@@ -193,5 +194,19 @@ namespace Avalonia.Diagnostics.ViewModels
                 UpdateFocusedControl();
             }
         }
+
+        public void RequestTreeNavigateTo(IControl control, bool isVisualTree)
+        {
+            var tree = isVisualTree ? _visualTree : _logicalTree;
+
+            var node = tree.FindNode(control);
+
+            if (node != null)
+            {
+                SelectedTab = isVisualTree ? 1 : 0;
+
+                tree.SelectControl(control);
+            }
+        }
     }
 }

+ 114 - 72
src/Avalonia.Diagnostics/Diagnostics/Views/ControlDetailsView.xaml

@@ -8,11 +8,16 @@
 
   <UserControl.Resources>
     <SolidColorBrush x:Key="ThicknessBorderBrush" Color="#666666" />
+    <SolidColorBrush x:Key="HighlightBorderBrush" Color="CornflowerBlue" />
     <SolidColorBrush x:Key="SizeGuidelineBrush" Color="#333333" />
     <SolidColorBrush x:Key="MarginBackgroundBrush" Color="#D78965" />
+    <SolidColorBrush x:Key="MarginHighlightBrush" Color="#EA966F" />
     <SolidColorBrush x:Key="BorderBackgroundBrush" Color="#E3C381" />
+    <SolidColorBrush x:Key="BorderHighlightBrush" Color="#EFCD88" />
     <SolidColorBrush x:Key="PaddingBackgroundBrush" Color="#B8C47F" />
+    <SolidColorBrush x:Key="PaddingHighlightBrush" Color="#CEDA8E" />
     <SolidColorBrush x:Key="SizeBackgroundBrush" Color="#88B2BD" />
+    <SolidColorBrush x:Key="SizeHighlightBrush" Color="#9ED0DC" />
     <conv:BoolToOpacityConverter x:Key="BoolToOpacity" Opacity="0.6"/>
   </UserControl.Resources>
 
@@ -24,43 +29,60 @@
       <Setter Property="BorderBrush" Value="{StaticResource ThicknessBorderBrush}" />
       <Setter Property="Template">
         <ControlTemplate>
-          <Border
-            Background="{TemplateBinding Background}"
-            BorderBrush="{TemplateBinding BorderBrush}"
-            BorderThickness="{TemplateBinding BorderThickness}">
-            <Grid RowDefinitions="Auto,*,Auto" ColumnDefinitions="Auto,*,Auto">
-              <Grid.Styles>
-                <Style Selector="TextBox.thickness-edit">
-                  <Setter Property="Background" Value="Transparent" />
-                  <Setter Property="BorderThickness" Value="0" />
-                  <Setter Property="Margin" Value="2" />
-                  <Setter Property="HorizontalAlignment" Value="Stretch" />
-                  <Setter Property="VerticalAlignment" Value="Stretch" />
-                  <Setter Property="HorizontalContentAlignment" Value="Center" />
-                  <Setter Property="VerticalContentAlignment" Value="Center" />
-                  <Setter Property="(ScrollViewer.HorizontalScrollBarVisibility)" Value="Disabled" />
-                  <Setter Property="(ScrollViewer.VerticalScrollBarVisibility)" Value="Disabled" />
-                  <Setter Property="IsVisible" Value="{Binding $parent[local:ThicknessEditor].IsPresent}" />
-                </Style>
-              </Grid.Styles>
-              <TextBlock IsVisible="{TemplateBinding IsPresent}" Margin="4,0,0,0" Text="{TemplateBinding Header}" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" />
-              <TextBox Grid.Row="1" Grid.Column="0" Text="{Binding Left, RelativeSource={RelativeSource TemplatedParent}}" Classes="thickness-edit" />
-              <TextBox x:Name="Right"  Grid.Row="0" Grid.Column="1" Text="{Binding Top, RelativeSource={RelativeSource TemplatedParent}}" Classes="thickness-edit" />
-              <TextBox Grid.Row="1" Grid.Column="2" Text="{Binding Right, RelativeSource={RelativeSource TemplatedParent}}"  Classes="thickness-edit" />
-              <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding Bottom, RelativeSource={RelativeSource TemplatedParent}}" Classes="thickness-edit" />
-              <ContentPresenter Grid.Row="1" Grid.Column="1"
-                Name="PART_ContentPresenter"
-                                ContentTemplate="{TemplateBinding ContentTemplate}"
-                                Content="{TemplateBinding Content}"
-                                Padding="{TemplateBinding Padding}"
-                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
-                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" />
-            </Grid>
-          </Border>
+          <Panel>
+            <Rectangle x:Name="PART_Background" Classes.no-content-pointerover="{Binding !#PART_ContentPresenter.IsPointerOver}" />
+            <Border
+              x:Name="PART_Border"
+              Classes.no-content-pointerover="{Binding !#PART_ContentPresenter.IsPointerOver}"
+              BorderBrush="{TemplateBinding BorderBrush}"
+              BorderThickness="{TemplateBinding BorderThickness}">
+              <Grid RowDefinitions="Auto,*,Auto" ColumnDefinitions="Auto,*,Auto">
+                <Grid.Styles>
+                  <Style Selector="TextBox.thickness-edit">
+                    <Setter Property="Background" Value="Transparent" />
+                    <Setter Property="BorderThickness" Value="0" />
+                    <Setter Property="Margin" Value="2" />
+                    <Setter Property="HorizontalAlignment" Value="Stretch" />
+                    <Setter Property="VerticalAlignment" Value="Stretch" />
+                    <Setter Property="HorizontalContentAlignment" Value="Center" />
+                    <Setter Property="VerticalContentAlignment" Value="Center" />
+                    <Setter Property="(ScrollViewer.HorizontalScrollBarVisibility)" Value="Disabled" />
+                    <Setter Property="(ScrollViewer.VerticalScrollBarVisibility)" Value="Disabled" />
+                    <Setter Property="IsVisible" Value="{Binding $parent[local:ThicknessEditor].IsPresent}" />
+                  </Style>
+                </Grid.Styles>
+                <TextBlock IsVisible="{TemplateBinding IsPresent}" Margin="4,0,0,0" Text="{TemplateBinding Header}" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" />
+                <TextBox Grid.Row="1" Grid.Column="0" Text="{Binding Left, RelativeSource={RelativeSource TemplatedParent}}" Classes="thickness-edit" />
+                <TextBox x:Name="Right"  Grid.Row="0" Grid.Column="1" Text="{Binding Top, RelativeSource={RelativeSource TemplatedParent}}" Classes="thickness-edit" />
+                <TextBox Grid.Row="1" Grid.Column="2" Text="{Binding Right, RelativeSource={RelativeSource TemplatedParent}}"  Classes="thickness-edit" />
+                <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding Bottom, RelativeSource={RelativeSource TemplatedParent}}" Classes="thickness-edit" />
+                <ContentPresenter Grid.Row="1" Grid.Column="1"
+                                  Name="PART_ContentPresenter"
+                                  ContentTemplate="{TemplateBinding ContentTemplate}"
+                                  Content="{TemplateBinding Content}"
+                                  Padding="{TemplateBinding Padding}"
+                                  VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
+                                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" />
+              </Grid>
+            </Border>
+          </Panel>
 
         </ControlTemplate>
       </Setter>
     </Style>
+
+    <Style Selector="local|ThicknessEditor /template/ Rectangle#PART_Background">
+      <Setter Property="Fill" Value="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" />
+    </Style>
+
+    <Style Selector="local|ThicknessEditor:pointerover /template/ Rectangle#PART_Background.no-content-pointerover">
+      <Setter Property="Fill" Value="{Binding Highlight, RelativeSource={RelativeSource TemplatedParent}}" />
+    </Style>
+
+    <Style Selector="local|ThicknessEditor:pointerover /template/ Border#PART_Border.no-content-pointerover">
+      <Setter Property="BorderBrush" Value="{StaticResource HighlightBorderBrush}" />
+    </Style>
+
     <Style Selector="local|ThicknessEditor[IsPresent=False]">
       <Setter Property="BorderThickness" Value="0" />
     </Style>
@@ -110,47 +132,67 @@
 
     <Grid Grid.Column="2" RowDefinitions="Auto,*, Auto,*,Auto" >
       <TextBlock Grid.Row="0" Text="Layout Visualizer" Margin="4" />
-      
-      <Grid Grid.Row="1" x:Name="LayoutRoot" Margin="8,0,8,8" RowDefinitions="Auto,Auto" ColumnDefinitions="Auto,Auto">
-
-        <Border x:Name="VerticalSize" Grid.Row="0" Grid.Column="1" >
-          <TextBlock VerticalAlignment="Center" FontWeight="Bold"
-                     TextDecorations="{Binding Layout.HeightConstraint, Converter={x:Static local:Converters.HasConstraintConverter}}"
-                     Text="{Binding Layout.Height}"
-                     ToolTip.Tip="{Binding Layout.HeightConstraint}" />
-        </Border>
-        
-        <Border x:Name="HorizontalSize" Grid.Row="1" Grid.Column="0" >
-          <TextBlock HorizontalAlignment="Center" FontWeight="Bold" 
-                     TextDecorations="{Binding Layout.WidthConstraint, Converter={x:Static local:Converters.HasConstraintConverter}}"
-                     Text="{Binding Layout.Width}" 
-                     ToolTip.Tip="{Binding Layout.WidthConstraint}" />
-        </Border>
-        
-        <local:ThicknessEditor Grid.Row="0" Grid.Column="0" Header="margin" VerticalAlignment="Top" HorizontalAlignment="Center" Background="{StaticResource MarginBackgroundBrush}" Thickness="{Binding Layout.MarginThickness}">
-          <local:ThicknessEditor x:Name="BorderArea" Header="border" Background="{StaticResource BorderBackgroundBrush}" Thickness="{Binding Layout.BorderThickness}" IsPresent="{Binding Layout.HasBorder}">
-            <local:ThicknessEditor x:Name="PaddingArea" Header="padding" Background="{StaticResource PaddingBackgroundBrush}" Thickness="{Binding Layout.PaddingThickness}" IsPresent="{Binding Layout.HasPadding}">
-              <Border x:Name="ContentArea" BorderThickness="1" BorderBrush="{StaticResource ThicknessBorderBrush}" MinWidth="100" MinHeight="16" Background="{StaticResource SizeBackgroundBrush}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
-                <TextBlock Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" Text="content" />
-              </Border>
+
+      <Viewbox Grid.Row="1" StretchDirection="DownOnly" >
+        <Grid Grid.Row="1" x:Name="LayoutRoot" Margin="8,0,8,8" RowDefinitions="Auto,Auto" ColumnDefinitions="Auto,Auto">
+
+          <Grid.Styles>
+            <Style Selector="TextBlock.with-constraint">
+              <Setter Property="TextDecorations" Value="Underline" />
+            </Style>
+
+          </Grid.Styles>
+
+          <Border x:Name="VerticalSize" Grid.Row="0" Grid.Column="1" >
+            <TextBlock VerticalAlignment="Center" FontWeight="Bold"
+                       Classes.with-constraint="{Binding Layout.HeightConstraint, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
+                       Text="{Binding Layout.Height}"
+                       ToolTip.Tip="{Binding Layout.HeightConstraint}" />
+          </Border>
+
+          <Border x:Name="HorizontalSize" Grid.Row="1" Grid.Column="0" >
+            <TextBlock HorizontalAlignment="Center" FontWeight="Bold"
+                       Classes.with-constraint="{Binding Layout.WidthConstraint, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
+                       Text="{Binding Layout.Width}"
+                       ToolTip.Tip="{Binding Layout.WidthConstraint}" />
+          </Border>
+
+          <local:ThicknessEditor Grid.Row="0" Grid.Column="0" Header="margin" VerticalAlignment="Top" HorizontalAlignment="Center" Background="{StaticResource MarginBackgroundBrush}" Highlight="{StaticResource MarginHighlightBrush}" Thickness="{Binding Layout.MarginThickness}">
+            <local:ThicknessEditor x:Name="BorderArea" Header="border" Background="{StaticResource BorderBackgroundBrush}" Highlight="{StaticResource BorderHighlightBrush}" Thickness="{Binding Layout.BorderThickness}" IsPresent="{Binding Layout.HasBorder}">
+              <local:ThicknessEditor x:Name="PaddingArea" Header="padding" Background="{StaticResource PaddingBackgroundBrush}" Highlight="{StaticResource PaddingHighlightBrush}" Thickness="{Binding Layout.PaddingThickness}" IsPresent="{Binding Layout.HasPadding}">
+                <Border x:Name="ContentArea" BorderThickness="1" MinWidth="100" MinHeight="16" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
+                  <Border.Styles>
+                    <Style Selector="Border">
+                      <Setter Property="Background" Value="{StaticResource SizeBackgroundBrush}" />
+                      <Setter Property="BorderBrush" Value="{StaticResource ThicknessBorderBrush}" />
+                    </Style>
+                    <Style Selector="Border:pointerover">
+                      <Setter Property="Background" Value="{StaticResource SizeHighlightBrush}" />
+                      <Setter Property="BorderBrush" Value="{StaticResource HighlightBorderBrush}" />
+                    </Style>
+                  </Border.Styles>
+                  <TextBlock Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" Text="content" />
+                </Border>
+              </local:ThicknessEditor>
             </local:ThicknessEditor>
           </local:ThicknessEditor>
-        </local:ThicknessEditor>
-
-        <Canvas Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2">
-          <Canvas.Styles>
-            <Style Selector="Rectangle">
-              <Setter Property="StrokeDashArray" Value="1,3" />
-              <Setter Property="Stroke" Value="{StaticResource SizeGuidelineBrush}" />
-              <Setter Property="StrokeThickness" Value="1" />
-            </Style>
-          </Canvas.Styles>
-          <Rectangle x:Name="HorizontalSizeBegin" />
-          <Rectangle x:Name="HorizontalSizeEnd" />
-          <Rectangle x:Name="VerticalSizeBegin" />
-          <Rectangle x:Name="VerticalSizeEnd" />
-        </Canvas>
-      </Grid>
+
+          <Canvas Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2">
+            <Canvas.Styles>
+              <Style Selector="Rectangle">
+                <Setter Property="StrokeDashArray" Value="1,3" />
+                <Setter Property="Stroke" Value="{StaticResource SizeGuidelineBrush}" />
+                <Setter Property="StrokeThickness" Value="1" />
+                <Setter Property="IsHitTestVisible" Value="False" />
+              </Style>
+            </Canvas.Styles>
+            <Rectangle x:Name="HorizontalSizeBegin" />
+            <Rectangle x:Name="HorizontalSizeEnd" />
+            <Rectangle x:Name="VerticalSizeBegin" />
+            <Rectangle x:Name="VerticalSizeEnd" />
+          </Canvas>
+        </Grid>
+      </Viewbox>
 
       <Grid Grid.Row="2" Margin="4" RowDefinitions="Auto,Auto">
 

+ 103 - 32
src/Avalonia.Diagnostics/Diagnostics/Views/EventsPageView.xaml

@@ -2,58 +2,129 @@
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:vm="clr-namespace:Avalonia.Diagnostics.ViewModels"
              xmlns:conv="clr-namespace:Avalonia.Diagnostics.Converters"
-             x:Class="Avalonia.Diagnostics.Views.EventsPageView">
-  <UserControl.Resources>
-    <conv:BoolToBrushConverter x:Key="boolToBrush" Brush="#d9ffdc"/>
-  </UserControl.Resources>
-  <Grid ColumnDefinitions="*,4,3*">
-    <TreeView Name="tree" Items="{Binding Nodes}" SelectedItem="{Binding SelectedNode, Mode=TwoWay}"
-              Grid.RowSpan="2">
-      <TreeView.DataTemplates>
-        <TreeDataTemplate DataType="vm:EventTreeNodeBase"
-                          ItemsSource="{Binding Children}">
-          <CheckBox Content="{Binding Text}" IsChecked="{Binding IsEnabled, Mode=TwoWay}" />
-        </TreeDataTemplate>
-      </TreeView.DataTemplates>
-      <TreeView.Styles>
-        <Style Selector="TreeViewItem">
-          <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
-        </Style>
-      </TreeView.Styles>
-    </TreeView>
+             x:Class="Avalonia.Diagnostics.Views.EventsPageView"
+             Margin="2">
+  <UserControl.Styles>
+    <Style Selector="TextBlock.nav" >
+      <Setter Property="TextDecorations">
+        <TextDecorationCollection>
+          <TextDecoration Location="Underline" Stroke="Black" StrokeThickness="1" StrokeDashArray="2,2"/>
+        </TextDecorationCollection>
+      </Setter>
+    </Style>
+
+    <Style Selector="TextBlock.nav:pointerover" >
+      <Setter Property="Foreground" Value="{DynamicResource ThemeAccentBrush}" />
+      <Setter Property="Cursor" Value="Help" />
+    </Style>
+
+    <Style Selector="ListBoxItem" >
+      <Setter Property="BorderThickness" Value="1" />
+    </Style>
+
+    <Style Selector="ListBoxItem:selected /template/ ContentPresenter" >
+      <Setter Property="BorderBrush" Value="Black" />
+    </Style>
+
+    <Style Selector="ListBoxItem.handled" >
+      <Setter Property="Background" Value="#d9ffdc" />
+    </Style>
+  </UserControl.Styles>
+
+  <Grid ColumnDefinitions="1.1*,4,3*">
+
+    <Grid Grid.Column="0" RowDefinitions="Auto,*,Auto">
+
+      <TextBox Classes="clearButton" Grid.Row="0" Margin="0,0,0,2" Text="{Binding EventTypeFilter}" Watermark="Search event types" />
+
+      <TreeView Grid.Row="1" Items="{Binding Nodes}" SelectedItem="{Binding SelectedNode, Mode=TwoWay}" >
+        <TreeView.DataTemplates>
+          <TreeDataTemplate DataType="vm:EventTreeNodeBase"
+                            ItemsSource="{Binding Children}">
+            <CheckBox Content="{Binding Text}" IsChecked="{Binding IsEnabled, Mode=TwoWay}" />
+          </TreeDataTemplate>
+        </TreeView.DataTemplates>
+        <TreeView.Styles>
+          <Style Selector="TreeViewItem">
+            <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
+            <Setter Property="IsVisible" Value="{Binding IsVisible}" />
+          </Style>
+        </TreeView.Styles>
+      </TreeView>
+
+      <StackPanel Grid.Row="2" Margin="0,2" Orientation="Horizontal" Spacing="2">
+        <Button Content="Disable all" Command="{Binding DisableAll}" />
+        <Button Content="Enable default" Command="{Binding EnableDefault}" />
+      </StackPanel>
+
+    </Grid>
 
     <GridSplitter Width="4" Grid.Column="1" />
+
     <Grid RowDefinitions="*,4,2*,Auto" Grid.Column="2">
-      <ListBox Name="eventsList" Items="{Binding RecordedEvents}"
+
+      <ListBox Name="EventsList" Items="{Binding RecordedEvents}"
                SelectedItem="{Binding SelectedEvent, Mode=TwoWay}">
+
         <ListBox.ItemTemplate>
           <DataTemplate>
-            <TextBlock Background="{Binding IsHandled, Converter={StaticResource boolToBrush}}"
-                       Text="{Binding DisplayText}" />
+            <ListBoxItem Classes.handled="{Binding IsHandled}">
+              <Grid ColumnDefinitions="Auto,Auto,*,Auto">
+
+                <StackPanel Grid.Column="0" Spacing="2" Orientation="Horizontal" >
+                  <TextBlock Tag="{Binding Event}" DoubleTapped="NavigateTo" Text="{Binding Event.Name}" FontWeight="Bold" Classes="nav" />
+                  <TextBlock Text="on" />
+                  <TextBlock Tag="{Binding Originator}" DoubleTapped="NavigateTo" Text="{Binding Originator.HandlerName}" Classes="nav" />
+                </StackPanel>
+
+                <StackPanel Margin="2,0,0,0" Grid.Column="1" Spacing="2" Orientation="Horizontal" IsVisible="{Binding IsHandled}" >
+                  <TextBlock Text="::" />
+                  <TextBlock Text="Handled by" />
+                  <TextBlock Tag="{Binding HandledBy}" DoubleTapped="NavigateTo" Text="{Binding HandledBy.HandlerName}" Classes="nav" />
+                </StackPanel>
+
+                <StackPanel Grid.Column="3" Orientation="Horizontal" HorizontalAlignment="Right">
+                  <TextBlock Text="Routing (" />
+                  <TextBlock Text="{Binding Event.RoutingStrategies}"/>
+                  <TextBlock Text=")"/>
+                </StackPanel>
+
+              </Grid>
+            </ListBoxItem>
           </DataTemplate>
         </ListBox.ItemTemplate>
       </ListBox>
+
       <GridSplitter Height="4" Grid.Row="1" />
+
       <DockPanel Grid.Row="2" LastChildFill="True">
         <TextBlock DockPanel.Dock="Top" FontSize="16" Text="Event chain:" />
+
         <ListBox Items="{Binding SelectedEvent.EventChain}">
           <ListBox.ItemTemplate>
             <DataTemplate>
-              <StackPanel Orientation="Horizontal"
-                          Background="{Binding Handled, Converter={StaticResource boolToBrush}}">
-                <TextBlock Text="{Binding Route}" />
-                <TextBlock Text=": " />
-                <TextBlock Text="{Binding HandlerName}" />
-                <TextBlock Text=" handled: " />
-                <TextBlock Text="{Binding Handled}" />
-              </StackPanel>
+              <ListBoxItem Classes.handled="{Binding Handled}">
+                <StackPanel Orientation="Vertical">
+
+                  <Rectangle IsVisible="{Binding BeginsNewRoute}" StrokeDashArray="2,2" StrokeThickness="1" Stroke="Gray" />
+
+                  <StackPanel Orientation="Horizontal" Spacing="2">
+                    <TextBlock Text="{Binding Route}" FontWeight="Bold" />
+                    <TextBlock Tag="{Binding}" DoubleTapped="NavigateTo" Text="{Binding HandlerName}" Classes="nav" />
+                  </StackPanel>
+
+                </StackPanel>
+              </ListBoxItem>
             </DataTemplate>
           </ListBox.ItemTemplate>
         </ListBox>
+
       </DockPanel>
-      <StackPanel Orientation="Horizontal" Grid.Row="3">
-        <Button Content="Clear" Margin="3" Command="{Binding Clear}" />
+
+      <StackPanel Orientation="Horizontal" Grid.Row="3" Spacing="2" Margin="0,2">
+        <Button Content="Clear" Command="{Binding Clear}" />
       </StackPanel>
+
     </Grid>
   </Grid>
 </UserControl>

+ 52 - 5
src/Avalonia.Diagnostics/Diagnostics/Views/EventsPageView.xaml.cs

@@ -1,7 +1,14 @@
-using System.Linq;
+using System;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using System.Linq;
 using Avalonia.Controls;
+using Avalonia.Diagnostics.Models;
 using Avalonia.Diagnostics.ViewModels;
+using Avalonia.Input;
+using Avalonia.Interactivity;
 using Avalonia.Markup.Xaml;
+using Avalonia.Threading;
 
 namespace Avalonia.Diagnostics.Views
 {
@@ -12,13 +19,53 @@ namespace Avalonia.Diagnostics.Views
         public EventsPageView()
         {
             InitializeComponent();
-            _events = this.FindControl<ListBox>("events");
+            _events = this.FindControl<ListBox>("EventsList");
         }
 
-        private void RecordedEvents_CollectionChanged(object sender,
-            System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
+        public void NavigateTo(object sender, TappedEventArgs e)
         {
-            _events.ScrollIntoView(_events.Items.OfType<FiredEvent>().LastOrDefault());
+            if (DataContext is EventsPageViewModel vm && sender is Control control)
+            {
+                switch (control.Tag)
+                {
+                    case EventChainLink chainLink:
+                    {
+                        vm.RequestTreeNavigateTo(chainLink);
+                        break;
+                    }
+                    case RoutedEvent evt:
+                    {
+                        vm.SelectEventByType(evt);
+
+                        break;
+                    }
+                }
+            }
+        }
+
+        protected override void OnDataContextChanged(EventArgs e)
+        {
+            base.OnDataContextChanged(e);
+
+            if (DataContext is EventsPageViewModel vm)
+            {
+                vm.RecordedEvents.CollectionChanged += OnRecordedEventsChanged;
+            }
+        }
+
+        private void OnRecordedEventsChanged(object sender, NotifyCollectionChangedEventArgs e)
+        {
+            if (sender is ObservableCollection<FiredEvent> events)
+            {
+                var evt = events.LastOrDefault();
+
+                if (evt is null)
+                {
+                    return;
+                }
+
+                Dispatcher.UIThread.Post(() => _events.ScrollIntoView(evt));
+            }
         }
 
         private void InitializeComponent()

+ 8 - 13
src/Avalonia.Diagnostics/Diagnostics/Views/ThicknessEditor.cs

@@ -1,21 +1,9 @@
 using Avalonia.Controls;
 using Avalonia.Data;
-using Avalonia.Data.Converters;
 using Avalonia.Media;
 
 namespace Avalonia.Diagnostics.Views
 {
-    internal static class Converters
-    {
-        public static IValueConverter HasConstraintConverter =
-            new FuncValueConverter<object, TextDecorationCollection>(ConvertToDecoration);
-
-        private static TextDecorationCollection ConvertToDecoration(object arg)
-        {
-            return arg != null ? TextDecorations.Underline : null;
-        }
-    }
-
     internal class ThicknessEditor : ContentControl
     {
         public static readonly DirectProperty<ThicknessEditor, Thickness> ThicknessProperty =
@@ -44,6 +32,14 @@ namespace Avalonia.Diagnostics.Views
             AvaloniaProperty.RegisterDirect<ThicknessEditor, double>(nameof(Bottom), o => o.Bottom,
                 (o, v) => o.Bottom = v);
 
+        public static readonly StyledProperty<IBrush> HighlightProperty =
+            AvaloniaProperty.Register<ThicknessEditor, IBrush>(nameof(Highlight));
+
+        public IBrush Highlight
+        {
+            get => GetValue(HighlightProperty);
+            set => SetValue(HighlightProperty, value);
+        }
         
         private Thickness _thickness;
         private string _header;
@@ -52,7 +48,6 @@ namespace Avalonia.Diagnostics.Views
         private double _top;
         private double _right;
         private double _bottom;
-
         private bool _isUpdatingThickness;
 
         public Thickness Thickness

+ 22 - 0
src/Avalonia.Headless/HeadlessPlatformRenderInterface.cs

@@ -70,6 +70,28 @@ namespace Avalonia.Headless
             return new HeadlessBitmapStub(new Size(1, 1), new Vector(96, 96));
         }
 
+        public IWriteableBitmapImpl LoadWriteableBitmapToWidth(Stream stream, int width,
+            BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
+        {
+            return new HeadlessBitmapStub(new Size(1, 1), new Vector(96, 96));
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmapToHeight(Stream stream, int height,
+            BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
+        {
+            return new HeadlessBitmapStub(new Size(1, 1), new Vector(96, 96));
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmap(string fileName)
+        {
+            return new HeadlessBitmapStub(new Size(1, 1), new Vector(96, 96));
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmap(Stream stream)
+        {
+            return new HeadlessBitmapStub(new Size(1, 1), new Vector(96, 96));
+        }
+
         public IBitmapImpl LoadBitmap(PixelFormat format, AlphaFormat alphaFormat, IntPtr data, PixelSize size, Vector dpi, int stride)
         {
             return new HeadlessBitmapStub(new Size(1, 1), new Vector(96, 96));

+ 9 - 0
src/Avalonia.Layout/WrapLayout/WrapLayout.cs

@@ -236,6 +236,15 @@ namespace Avalonia.Layout
             // for the last condition it is zeros so adding it will make no difference
             // this way is faster than an if condition in every loop for checking the last item
             totalMeasure.U = parentMeasure.U;
+            
+            // Propagating an infinite size causes a crash. This can happen if the parent is scrollable and infinite in the opposite
+            // axis to the panel. Clearing to zero prevents the crash.
+            // This is likely an incorrect use of the control by the developer, however we need stability here so setting a default that wont crash.
+            if (double.IsInfinity(totalMeasure.U))
+            {
+                totalMeasure.U = 0.0;
+            }
+            
             totalMeasure.V = state.GetHeight();
 
             totalMeasure.U = Math.Ceiling(totalMeasure.U);

+ 27 - 12
src/Avalonia.Styling/Controls/Classes.cs

@@ -2,6 +2,8 @@ using System;
 using System.Collections.Generic;
 using Avalonia.Collections;
 
+#nullable enable
+
 namespace Avalonia.Controls
 {
     /// <summary>
@@ -90,7 +92,7 @@ namespace Avalonia.Controls
         }
 
         /// <summary>
-        /// Remvoes all non-pseudoclasses from the collection.
+        /// Removes all non-pseudoclasses from the collection.
         /// </summary>
         public override void Clear()
         {
@@ -135,7 +137,7 @@ namespace Avalonia.Controls
         /// </remarks>
         public override void InsertRange(int index, IEnumerable<string> names)
         {
-            var c = new List<string>();
+            List<string>? toInsert = null;
 
             foreach (var name in names)
             {
@@ -143,11 +145,16 @@ namespace Avalonia.Controls
 
                 if (!Contains(name))
                 {
-                    c.Add(name);
+                    toInsert ??= new List<string>();
+
+                    toInsert.Add(name);
                 }
             }
 
-            base.InsertRange(index, c);
+            if (toInsert != null)
+            {
+                base.InsertRange(index, toInsert);
+            }
         }
 
         /// <summary>
@@ -176,19 +183,21 @@ namespace Avalonia.Controls
         /// </remarks>
         public override void RemoveAll(IEnumerable<string> names)
         {
-            var c = new List<string>();
+            List<string>? toRemove = null;
 
             foreach (var name in names)
             {
                 ThrowIfPseudoclass(name, "removed");
 
-                if (Contains(name))
-                {
-                    c.Add(name);
-                }
+                toRemove ??= new List<string>();
+
+                toRemove.Add(name);
             }
 
-            base.RemoveAll(c);
+            if (toRemove != null)
+            {
+                base.RemoveAll(toRemove);
+            }
         }
 
         /// <summary>
@@ -223,7 +232,7 @@ namespace Avalonia.Controls
         /// <param name="source">The new contents of the collection.</param>
         public void Replace(IList<string> source)
         {
-            var toRemove = new List<string>();
+            List<string>? toRemove = null;
 
             foreach (var name in source)
             {
@@ -234,11 +243,17 @@ namespace Avalonia.Controls
             {
                 if (!name.StartsWith(":"))
                 {
+                    toRemove ??= new List<string>();
+
                     toRemove.Add(name);
                 }
             }
 
-            base.RemoveAll(toRemove);
+            if (toRemove != null)
+            {
+                base.RemoveAll(toRemove);
+            }
+
             base.AddRange(source);
         }
 

+ 15 - 0
src/Avalonia.Themes.Fluent/Accents/AccentColors.xaml

@@ -0,0 +1,15 @@
+<Style xmlns="https://github.com/avaloniaui"
+       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+       xmlns:sys="clr-namespace:System;assembly=netstandard">
+  <Style.Resources>
+    <!-- Accent Colours -->
+    <!-- TODO pull accents from system... algorithm to generate shades -->
+    <Color x:Key="SystemAccentColor">#FF0078D7</Color>
+    <Color x:Key="SystemAccentColorDark1">#FF005A9E</Color>
+    <Color x:Key="SystemAccentColorDark2">#FF004275</Color>
+    <Color x:Key="SystemAccentColorDark3">#FF002642</Color>
+    <Color x:Key="SystemAccentColorLight1">#FF429CE3</Color>
+    <Color x:Key="SystemAccentColorLight2">#FF76B9ED</Color>
+    <Color x:Key="SystemAccentColorLight3">#FFA6D8FF</Color>
+  </Style.Resources>
+</Style>

+ 15 - 1
src/Avalonia.Themes.Fluent/Accents/Base.xaml

@@ -1,6 +1,7 @@
 <Style xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-       xmlns:sys="clr-namespace:System;assembly=netstandard">
+       xmlns:sys="using:System"
+       xmlns:converters="using:Avalonia.Controls.Converters">
   <Style.Resources>
     <!-- https://docs.microsoft.com/en-us/previous-versions/windows/apps/dn518235(v=win.10)?redirectedfrom=MSDN -->
     <!-- SystemColor Color Resources (Reflect OS High Contrast Settings) -->
@@ -22,5 +23,18 @@
     <Thickness x:Key="TextControlThemePadding">10,6,6,5</Thickness>
     <sys:Double x:Key="IconElementThemeHeight">20</sys:Double>
     <sys:Double x:Key="IconElementThemeWidth">20</sys:Double>
+
+    <!-- Override system shape defaults -->
+    <CornerRadius x:Key="ControlCornerRadius">3</CornerRadius>
+    <CornerRadius x:Key="OverlayCornerRadius">5</CornerRadius>
+
+    <!-- ScrollBar animation -->
+    <TransformOperations x:Key="VerticalSmallScrollThumbScaleTransform">scaleX(0.125) translateX(-2px)</TransformOperations>
+    <TransformOperations x:Key="HorizontalSmallScrollThumbScaleTransform">scaleY(0.125) translateY(-2px)</TransformOperations>
+
+    <converters:CornerRadiusFilterConverter x:Key="TopCornerRadiusFilterConverter" Filter="TopLeft, TopRight"/>
+    <converters:CornerRadiusFilterConverter x:Key="RightCornerRadiusFilterConverter" Filter="TopRight, BottomRight"/>
+    <converters:CornerRadiusFilterConverter x:Key="BottomCornerRadiusFilterConverter" Filter="BottomLeft, BottomRight"/>
+    <converters:CornerRadiusFilterConverter x:Key="LeftCornerRadiusFilterConverter" Filter="TopLeft, BottomLeft"/>
   </Style.Resources>
 </Style>

+ 29 - 195
src/Avalonia.Themes.Fluent/Accents/BaseDark.xaml

@@ -2,16 +2,6 @@
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sys="clr-namespace:System;assembly=netstandard">
   <Style.Resources>
-    <!-- Accent Colours -->
-    <!-- TODO pull accents from system... algorithm to generate shades -->
-    <Color x:Key="SystemAccentColor">#FF0078D7</Color>
-    <Color x:Key="SystemAccentColorDark1">#FF005A9E</Color>
-    <Color x:Key="SystemAccentColorDark2">#FF004275</Color>
-    <Color x:Key="SystemAccentColorDark3">#FF002642</Color>
-    <Color x:Key="SystemAccentColorLight1">#FF429CE3</Color>
-    <Color x:Key="SystemAccentColorLight2">#FF76B9ED</Color>
-    <Color x:Key="SystemAccentColorLight3">#FFA6D8FF</Color>
-
     <!-- System Control Colors -->
     <Color x:Key="SystemAltHighColor">#FF000000</Color>
     <Color x:Key="SystemAltLowColor">#33000000</Color>
@@ -40,6 +30,9 @@
     <Color x:Key="SystemListMediumColor">#33FFFFFF</Color>
     <Color x:Key="SystemErrorTextColor">#FFF000</Color>
 
+    <Color x:Key="SystemRevealListLowColor">#18FFFFFF</Color>
+    <Color x:Key="SystemRevealListMediumColor">#30FFFFFF</Color>
+
     <SolidColorBrush x:Key="SystemControlBackgroundAccentBrush" Color="{DynamicResource SystemAccentColor}" />
     <SolidColorBrush x:Key="SystemControlBackgroundAltHighBrush" Color="{StaticResource SystemAltHighColor}" />
     <SolidColorBrush x:Key="SystemControlBackgroundAltMediumHighBrush" Color="{StaticResource SystemAltMediumHighColor}" />
@@ -135,7 +128,6 @@
     <SolidColorBrush x:Key="SystemControlPageTextBaseHighBrush" Color="{StaticResource SystemBaseHighColor}" />
     <SolidColorBrush x:Key="SystemControlPageTextBaseMediumBrush" Color="{StaticResource SystemBaseMediumColor}" />
     <SolidColorBrush x:Key="SystemControlPageTextChromeBlackMediumLowBrush" Color="{StaticResource SystemChromeBlackMediumLowColor}" />
-    <SolidColorBrush x:Key="SystemControlTransparentBrush" Color="Transparent" />
     <SolidColorBrush x:Key="SystemControlErrorTextForegroundBrush" Color="{StaticResource SystemErrorTextColor}" />
     <SolidColorBrush x:Key="SystemControlTransientBorderBrush" Color="#000000" Opacity="0.36" />
     <SolidColorBrush x:Key="SystemControlHighlightListLowRevealBackgroundBrush" Color="{StaticResource SystemListMediumColor}" />
@@ -150,197 +142,39 @@
     <!--<AcrylicBrush x:Key="SystemControlTransientBackgroundBrush" BackgroundSource="HostBackdrop" TintColor="{StaticResource SystemChromeAltHighColor}" TintOpacity="0.8" FallbackColor="{StaticResource SystemChromeMediumLowColor}" />-->
     <SolidColorBrush x:Key="SystemControlTransientBackgroundBrush" Color="{StaticResource SystemChromeMediumLowColor}" />
     <StaticResource x:Key="SystemControlDescriptionTextForegroundBrush" ResourceKey="SystemControlPageTextBaseMediumBrush" />
-    <x:Boolean x:Key="IsApplicationFocusVisualKindReveal">False</x:Boolean>
+    
+    <!--<AcrylicBrush x:Key="SystemControlAcrylicWindowBrush" BackgroundSource="HostBackdrop" TintColor="{ThemeResource SystemChromeAltHighColor}" TintOpacity="0.8" FallbackColor="{ThemeResource SystemChromeMediumColor}" />-->
+    <!--<RevealBackgroundBrush x:Key="SystemControlTransparentRevealBackgroundBrush" TargetTheme="Dark" Color="Transparent" FallbackColor="Transparent" />-->
+    <SolidColorBrush x:Key="SystemControlTransparentRevealBackgroundBrush" Color="Transparent" />
+    <!--<RevealBorderBrush x:Key="SystemControlTransparentRevealBorderBrush" TargetTheme="Dark" Color="Transparent" FallbackColor="Transparent" />-->
+    <SolidColorBrush x:Key="SystemControlTransparentRevealBorderBrush" Color="Transparent" />
 
+    <Color x:Key="RegionColor">#FF000000</Color>
+    <SolidColorBrush x:Key="RegionBrush" Color="{StaticResource RegionColor}" />
 
-    <!-- Default Control Settings -->
-    <FontFamily x:Key="ContentControlThemeFontFamily">XamlAutoFontFamily</FontFamily>
-    <FontFamily x:Key="MTCMediaFontFamily">XamlAutoFontFamily</FontFamily>
-    <FontFamily x:Key="PhoneFontFamilyNormal">Segoe WP</FontFamily>
-    <FontFamily x:Key="PhoneFontFamilySemiLight">Segoe WP SemiLight</FontFamily>
-    <FontFamily x:Key="SettingsFlyoutHeaderThemeFontFamily">XamlAutoFontFamily</FontFamily>
-    <FontFamily x:Key="SymbolThemeFontFamily">Segoe MDL2 Assets</FontFamily>
-    <FontFamily x:Key="KeyTipFontFamily">XamlAutoFontFamily</FontFamily>
-    <x:Double x:Key="AppBarExpandButtonThemeHeight">24</x:Double>
-    <x:Double x:Key="AppBarExpandButtonThemeWidth">48</x:Double>
-    <x:Double x:Key="AppBarThemeMinHeight">56</x:Double>
-    <x:Double x:Key="AppBarThemeMinimalHeight">24</x:Double>
-    <x:Double x:Key="AppBarThemeCompactHeight">40</x:Double>
-    <x:Double x:Key="AppBarExpandButtonCircleDiameter">3</x:Double>
     <x:Double x:Key="AutoCompleteListMaxHeight">374</x:Double>
-    <x:Double x:Key="AutoCompleteListBorderOpacity">0</x:Double>
-    <Thickness x:Key="CheckBoxBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="CheckBoxCheckedStrokeThickness">0</Thickness>
-    <x:Double x:Key="ComboBoxArrowThemeFontSize">21</x:Double>
-    <x:Double x:Key="ComboBoxThemeMinWidth">64</x:Double>
-    <x:Double x:Key="ComboBoxPopupThemeMinWidth">80</x:Double>
-    <x:Double x:Key="ComboBoxPopupThemeTouchMinWidth">240</x:Double>
-    <x:Double x:Key="ControlContentThemeFontSize">14</x:Double>
-    <x:Double x:Key="ContentControlFontSize">14</x:Double>
-    <x:Double x:Key="ContentDialogMinWidth">320</x:Double>
-    <x:Double x:Key="ContentDialogMaxWidth">548</x:Double>
-    <x:Double x:Key="ContentDialogMinHeight">184</x:Double>
-    <x:Double x:Key="ContentDialogMaxHeight">756</x:Double>
-    <x:Double x:Key="ContentDialogButtonMinWidth">130</x:Double>
-    <x:Double x:Key="ContentDialogButtonMaxWidth">202</x:Double>
-    <x:Double x:Key="ContentDialogButtonMinHeight">32</x:Double>
-    <x:Double x:Key="ContentDialogButtonHeight">32</x:Double>
-    <x:Double x:Key="ContentDialogTitleMaxHeight">56</x:Double>
-    <x:Double x:Key="DatePickerSelectorThemeMinWidth">80</x:Double>
-    <x:Double x:Key="DatePickerSpacingThemeWidth">20</x:Double>
-    <x:Double x:Key="DatePickerSpacingThemeHeight">20</x:Double>
-    <x:Double x:Key="FlyoutThemeMaxHeight">758</x:Double>
-    <x:Double x:Key="FlyoutThemeMaxWidth">456</x:Double>
-    <x:Double x:Key="FlyoutThemeMinHeight">40</x:Double>
-    <x:Double x:Key="FlyoutThemeMinWidth">96</x:Double>
-    <x:Double x:Key="FlyoutThemeTouchMinWidth">240</x:Double>
-    <x:Double x:Key="GridViewItemSelectedBorderThemeThickness">4</x:Double>
-    <x:Double x:Key="HubHeaderThemeFontSize">34</x:Double>
-    <x:Double x:Key="HubSectionHeaderThemeFontSize">20</x:Double>
-    <x:Double x:Key="HubSectionHeaderSeeMoreThemeFontSize">14</x:Double>
-    <x:Double x:Key="ListPickerFlyoutFooterThemeHeight">80</x:Double>
-    <x:Double x:Key="GridViewItemReorderHintThemeOffset">16.0</x:Double>
-    <x:Double x:Key="MTCControlPanelHeight">42</x:Double>
-    <x:Double x:Key="MTCHorizontalVolumeSliderWidth">180</x:Double>
-    <x:Double x:Key="MTCMediaFontSize">12</x:Double>
-    <x:Double x:Key="MTCMediaButtonHeight">48</x:Double>
-    <x:Double x:Key="MTCMediaButtonWidth">48</x:Double>
-    <x:Double x:Key="MTCPositionSliderMinimumWidth">96</x:Double>
-    <x:Double x:Key="MTCSideMargins">16</x:Double>
-    <x:Double x:Key="MTCTimeButtonHeight">21</x:Double>
-    <x:Double x:Key="MTCTimeButtonWidth">62</x:Double>
-    <x:Double x:Key="MTCVerticalVolumeHostVerticalOffset">-112</x:Double>
-    <x:Double x:Key="MTCVerticalVolumeHostWidth">42</x:Double>
-    <x:Double x:Key="MTCVerticalVolumeSliderMaxHeight">289</x:Double>
-    <x:Double x:Key="MTCVerticalVolumeSliderMinHeight">96</x:Double>
-    <x:Double x:Key="MTCVerticalVolumeSliderTopGap">8</x:Double>
-    <x:Double x:Key="MTCVerticalVolumeSliderTopPadding">16</x:Double>
-    <x:Double x:Key="ProgressBarIndicatorPauseOpacity">0.6</x:Double>
-    <x:Double x:Key="ProgressBarThemeMinHeight">4</x:Double>
-    <x:Double x:Key="RadioButtonBorderThemeThickness">2</x:Double>
-    <x:Double x:Key="ScrollBarTrackBorderThemeThickness">0</x:Double>
-    <x:Double x:Key="SearchBoxContentThemeFontSize">14</x:Double>
-    <x:Double x:Key="SearchBoxResultSuggestionImageThemeWidth">32</x:Double>
-    <x:Double x:Key="SearchBoxResultSuggestionImageThemeHeight">32</x:Double>
-    <x:Double x:Key="SearchBoxSuggestionPopupThemeMinWidth">270</x:Double>
-    <x:Double x:Key="SearchBoxSuggestionPopupThemeMaxHeight">300</x:Double>
-    <x:Double x:Key="SearchBoxTextBoxThemeMinHeight">28</x:Double>
-    <x:Double x:Key="SemanticZoomButtonFontSize">4</x:Double>
-    <x:Double x:Key="SettingsFlyoutHeaderThemeFontSize">26.667</x:Double>
-
-    <x:Double x:Key="SliderOutsideTickBarThemeHeight">4</x:Double>
-    <x:Double x:Key="SliderTrackThemeHeight">2</x:Double>
-    <x:Double x:Key="SplitViewOpenPaneThemeLength">320</x:Double>
-    <x:Double x:Key="SplitViewCompactPaneThemeLength">48</x:Double>
-    <x:Double x:Key="TextControlBackgroundThemeOpacity">0.8</x:Double>
-    <x:Double x:Key="TextControlBorderThemeOpacity">0.8</x:Double>
-    <x:Double x:Key="TextControlBorderThemeBrushOpacity">1</x:Double>
-    <x:Double x:Key="TextControlPointerOverBackgroundThemeOpacity">0.87</x:Double>
-    <x:Double x:Key="TextControlPointerOverBorderThemeOpacity">0.87</x:Double>
-    <x:Double x:Key="TextControlPointerOverBorderThemeBrushOpacity">1</x:Double>
-    <x:Double x:Key="TextControlBackgroundRestOpacity">0.4</x:Double>
-    <x:Double x:Key="TextControlBackgroundHoverOpacity">0.6</x:Double>
-    <x:Double x:Key="TextControlBackgroundFocusedOpacity">1</x:Double>
-    <x:Double x:Key="TextControlThemeMinHeight">32</x:Double>
-    <x:Double x:Key="TextControlThemeMinWidth">64</x:Double>
-    <x:Double x:Key="TextStyleLargeFontSize">18.14</x:Double>
-    <x:Double x:Key="TextStyleExtraLargeFontSize">25.5</x:Double>
-
-    <x:Double x:Key="TimePickerSelectorThemeMinWidth">80</x:Double>
-    <x:Double x:Key="ToolTipContentThemeFontSize">12</x:Double>
-    <x:Double x:Key="ListViewHeaderItemMinHeight">44</x:Double>
-    <x:Double x:Key="GridViewHeaderItemMinHeight">44</x:Double>
-    <x:Double x:Key="ListViewHeaderItemThemeFontSize">20</x:Double>
-    <x:Double x:Key="GridViewHeaderItemThemeFontSize">20</x:Double>
-
-    <x:Double x:Key="ToggleSwitchOnStrokeThickness">0</x:Double>
-    <x:Double x:Key="GridViewItemMinWidth">44</x:Double>
-    <x:Double x:Key="GridViewItemMinHeight">44</x:Double>
-    <x:Double x:Key="KeyTipContentThemeFontSize">12</x:Double>
-    <Thickness x:Key="AppBarBottomBorderThemeThickness">0,0,0,0</Thickness>
-    <Thickness x:Key="AppBarBottomThemePadding">0,0,0,0</Thickness>
-    <Thickness x:Key="AppBarTopBorderThemeThickness">0,0,0,0</Thickness>
-    <Thickness x:Key="AppBarTopThemePadding">0,0,0,0</Thickness>
-    <Thickness x:Key="AppBarExpandButtonCircleInnerPadding">3,0,3,0</Thickness>
-    <Thickness x:Key="AutoCompleteListBorderThemeThickness">1</Thickness>
     <Thickness x:Key="AutoCompleteListMargin">0,2,0,2</Thickness>
+    <Thickness x:Key="AutoCompleteListBorderThemeThickness">1</Thickness>
     <Thickness x:Key="AutoCompleteListPadding">-1,0,-1,0</Thickness>
-    <Thickness x:Key="AutoCompleteListViewItemMargin">12,11,0,13</Thickness>
-    <Thickness x:Key="ButtonBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="CalendarDatePickerBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="ComboBoxBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="ComboBoxDropdownBorderThickness">1</Thickness>
-    <Thickness x:Key="ComboBoxDropdownBorderPadding">0</Thickness>
-    <Thickness x:Key="ComboBoxDropdownContentMargin">0,4,0,4</Thickness>
-    <Thickness x:Key="ComboBoxHeaderThemeMargin">0,0,0,4</Thickness>
-    <Thickness x:Key="ComboBoxPopupBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="ComboBoxItemThemePadding">11,5,11,7</Thickness>
-    <Thickness x:Key="ComboBoxItemThemeTouchPadding">11,11,11,13</Thickness>
-    <Thickness x:Key="ComboBoxItemThemeGameControllerPadding">11,11,11,13</Thickness>
-    <Thickness x:Key="ContentDialogBorderWidth">1</Thickness>
-    <Thickness x:Key="ContentDialogButton1HostMargin">0,0,4,0</Thickness>
-    <Thickness x:Key="ContentDialogButton2HostMargin">0,0,0,0</Thickness>
-    <Thickness x:Key="ContentDialogContentMargin">0,0,0,0</Thickness>
-    <Thickness x:Key="ContentDialogContentScrollViewerMargin">0,0,0,0</Thickness>
-    <Thickness x:Key="ContentDialogCommandSpaceMargin">0,24,0,0</Thickness>
-    <Thickness x:Key="ContentDialogTitleMargin">0,0,0,12</Thickness>
-    <Thickness x:Key="ContentDialogPadding">24,18,24,24</Thickness>
-    <Thickness x:Key="DatePickerHeaderThemeMargin">0,0,0,4</Thickness>
+    <x:Double x:Key="TextControlThemeMinHeight">32</x:Double>
+    <x:Double x:Key="TextControlThemeMinWidth">64</x:Double>
+    <x:Double x:Key="FlyoutThemeMaxWidth">456</x:Double>
+    <Thickness x:Key="DateTimeFlyoutButtonBorderThickness">0</Thickness>
     <Thickness x:Key="DateTimeFlyoutBorderThickness">1</Thickness>
     <Thickness x:Key="DateTimeFlyoutBorderPadding">0</Thickness>
-    <Thickness x:Key="DateTimeFlyoutButtonBorderThickness">0</Thickness>
-    <Thickness x:Key="DateTimeFlyoutContentPanelPortraitThemeMargin">0,37,0,0</Thickness>
-    <Thickness x:Key="DateTimeFlyoutContentPanelLandscapeThemeMargin">0,19,0,0</Thickness>
-    <Thickness x:Key="DateTimeFlyoutTitleThemeMargin">19,0,19,17.5</Thickness>
-    <Thickness x:Key="FlipViewButtonBorderThemeThickness">0</Thickness>
-    <Thickness x:Key="FlyoutContentThemeMargin">0,0,0,0</Thickness>
+
     <Thickness x:Key="FlyoutContentThemePadding">12,11,12,12</Thickness>
-    <Thickness x:Key="GridViewItemCompactSelectedBorderThemeThickness">4</Thickness>
-    <Thickness x:Key="GridViewItemMultiselectBorderThickness">2.5</Thickness>
-    <Thickness x:Key="HandwritingViewExpandedButtonMargin">5,6,5,6</Thickness>
-    <Thickness x:Key="HubSectionHeaderThemeMargin">0,0,0,9</Thickness>
-    <Thickness x:Key="HubSectionHeaderSeeMoreThemeMargin">24,0,0,11</Thickness>
-    <Thickness x:Key="HyperlinkButtonBorderThemeThickness">0</Thickness>
-    <Thickness x:Key="ListPickerFlyoutPresenterMultiselectCheckBoxMargin">0,9.5,0,0</Thickness>
-    <Thickness x:Key="ListPickerFlyoutPresenterItemMargin">0,0,0,19</Thickness>
-    <Thickness x:Key="PickerFlyoutContentPanelLandscapeThemeMargin">19,19,19,0</Thickness>
-    <Thickness x:Key="PickerFlyoutContentPanelPortraitThemeMargin">19,37,19,0</Thickness>
-    <Thickness x:Key="PickerFlyoutTitleThemeMargin">0,0,0,32.5</Thickness>
-    <Thickness x:Key="ProgressBarBorderThemeThickness">0</Thickness>
-    <Thickness x:Key="RepeatButtonBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="ScrollBarPanningBorderThemeThickness">1</Thickness>
-    <Thickness x:Key="SearchBoxQuerySuggestionThemeMargin">12,11,8,13</Thickness>
-    <Thickness x:Key="SearchBoxResultSuggestionThemeMargin">12,11,8,13</Thickness>
-    <Thickness x:Key="SearchBoxSeparatorSuggestionThemeMargin">12,11,8,13</Thickness>
-    <Thickness x:Key="SearchBoxSuggestionSubcomponentThemeMargin">0,0,12,0</Thickness>
-    <Thickness x:Key="SearchBoxThemePadding">12,4,8,4</Thickness>
-    <Thickness x:Key="SearchBoxIMECandidateListSeparatorThemeThickness">0,2,0,0</Thickness>
-    <Thickness x:Key="SearchBoxBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="SliderBorderThemeThickness">0</Thickness>
-    <Thickness x:Key="SliderHeaderThemeMargin">0,0,0,4</Thickness>
-    <Thickness x:Key="SplitViewLeftBorderThemeThickness">0,0,1,0</Thickness>
-    <Thickness x:Key="SplitViewRightBorderThemeThickness">1,0,0,0</Thickness>
-    <Thickness x:Key="TextControlBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="TextControlMarginThemeThickness">0,9.5,0,9.5</Thickness>
-    <Thickness x:Key="TextControlThemePadding">10,3,6,6</Thickness>
-    <Thickness x:Key="HelperButtonThemePadding">0,0,-2,0</Thickness>
-    <Thickness x:Key="TextControlPlaceholderThemePadding">12,5,10,5</Thickness>
-    <Thickness x:Key="TimePickerHeaderThemeMargin">0,0,0,4</Thickness>
-    <Thickness x:Key="TimePickerFirstHostThemeMargin">0,0,20,0</Thickness>
-    <Thickness x:Key="TimePickerThirdHostThemeMargin">20,0,0,0</Thickness>
-    <Thickness x:Key="ToggleButtonBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="KeyTipBorderThemeThickness">1</Thickness>
-    <Thickness x:Key="KeyTipThemePadding">4</Thickness>
-    <FontWeight x:Key="ComboBoxHeaderThemeFontWeight">Normal</FontWeight>
-    <FontWeight x:Key="ComboBoxPlaceholderTextThemeFontWeight">SemiLight</FontWeight>
-    <FontWeight x:Key="DatePickerHeaderThemeFontWeight">Normal</FontWeight>
-    <FontWeight x:Key="SearchBoxButtonThemeFontWeight">Normal</FontWeight>
-    <FontWeight x:Key="SearchBoxContentThemeFontWeight">Normal</FontWeight>
-    <FontWeight x:Key="TimePickerHeaderThemeFontWeight">Normal</FontWeight>
-    <FontWeight x:Key="SliderHeaderThemeFontWeight">Normal</FontWeight>
-    <FontWeight x:Key="HubHeaderThemeFontWeight">Light</FontWeight>
-    <FontWeight x:Key="HubSectionHeaderThemeFontWeight">Normal</FontWeight>
-    <GridLength x:Key="AppBarExpandButtonThemeWidthGridLength">48</GridLength>
-    <Thickness x:Key="MediaTransportControlsTitleSafeBounds">48,0,48,27</Thickness>
+    <x:Double x:Key="FlyoutThemeMinWidth">96</x:Double>
+    <x:Double x:Key="FlyoutThemeMinHeight">40</x:Double>
+    <x:Double x:Key="FlyoutThemeMaxHeight">758</x:Double>
+    
+    <!-- Moved from FlyoutPresenter.xaml -->
+    <Thickness x:Key="FlyoutBorderThemePadding">0</Thickness>
+
+    <!-- Moved from MenuItem.xaml -->
+    <Thickness x:Key="MenuFlyoutScrollerMargin">0,4,0,4</Thickness>
+
+    <!-- Moved from Menu.xaml -->
+    <Thickness x:Key="MenuBarItemPadding">12,0,12,0</Thickness> 
   </Style.Resources>
 </Style>

+ 31 - 193
src/Avalonia.Themes.Fluent/Accents/BaseLight.xaml

@@ -2,16 +2,6 @@
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sys="clr-namespace:System;assembly=netstandard">
   <Style.Resources>
-    <!-- Accent Colours -->
-    <!-- TODO pull accents from system... algorithm to generate shades -->
-    <Color x:Key="SystemAccentColor">#FF0078D7</Color>
-    <Color x:Key="SystemAccentColorDark1">#FF005A9E</Color>
-    <Color x:Key="SystemAccentColorDark2">#FF004275</Color>
-    <Color x:Key="SystemAccentColorDark3">#FF002642</Color>
-    <Color x:Key="SystemAccentColorLight1">#FF429CE3</Color>
-    <Color x:Key="SystemAccentColorLight2">#FF76B9ED</Color>
-    <Color x:Key="SystemAccentColorLight3">#FFA6D8FF</Color>
-
     <!-- System Control Colors -->
     <Color x:Key="SystemAltHighColor">#FFFFFFFF</Color>
     <Color x:Key="SystemAltLowColor">#33FFFFFF</Color>
@@ -40,6 +30,9 @@
     <Color x:Key="SystemListMediumColor">#33000000</Color>
     <Color x:Key="SystemErrorTextColor">#C50500</Color>
 
+    <Color x:Key="SystemRevealListLowColor">#17000000</Color>
+    <Color x:Key="SystemRevealListMediumColor">#2E000000</Color>
+
     <SolidColorBrush x:Key="SystemControlBackgroundAccentBrush" Color="{DynamicResource SystemAccentColor}" />
     <SolidColorBrush x:Key="SystemControlBackgroundAltHighBrush" Color="{StaticResource SystemAltHighColor}" />
     <SolidColorBrush x:Key="SystemControlBackgroundAltMediumHighBrush" Color="{StaticResource SystemAltMediumHighColor}" />
@@ -135,7 +128,6 @@
     <SolidColorBrush x:Key="SystemControlPageTextBaseHighBrush" Color="{StaticResource SystemBaseHighColor}" />
     <SolidColorBrush x:Key="SystemControlPageTextBaseMediumBrush" Color="{StaticResource SystemBaseMediumColor}" />
     <SolidColorBrush x:Key="SystemControlPageTextChromeBlackMediumLowBrush" Color="{StaticResource SystemChromeBlackMediumLowColor}" />
-    <SolidColorBrush x:Key="SystemControlTransparentBrush" Color="Transparent" />
     <SolidColorBrush x:Key="SystemControlErrorTextForegroundBrush" Color="{StaticResource SystemErrorTextColor}" />
     <SolidColorBrush x:Key="SystemControlTransientBorderBrush" Color="#000000" Opacity="0.14" />
     <SolidColorBrush x:Key="SystemControlHighlightListLowRevealBackgroundBrush" Color="{StaticResource SystemListMediumColor}" />
@@ -150,196 +142,42 @@
     <!--<AcrylicBrush x:Key="SystemControlTransientBackgroundBrush" BackgroundSource="HostBackdrop" TintColor="{StaticResource SystemChromeAltHighColor}" TintOpacity="0.8" FallbackColor="{StaticResource SystemChromeMediumLowColor}" />-->
     <SolidColorBrush x:Key="SystemControlTransientBackgroundBrush" Color="{StaticResource SystemChromeMediumLowColor}" />
     <StaticResource x:Key="SystemControlDescriptionTextForegroundBrush" ResourceKey="SystemControlPageTextBaseMediumBrush" />
-    <x:Boolean x:Key="IsApplicationFocusVisualKindReveal">False</x:Boolean>
+    
+    <!--<AcrylicBrush x:Key="SystemControlAcrylicWindowBrush" BackgroundSource="HostBackdrop" TintColor="{ThemeResource SystemChromeAltHighColor}" TintOpacity="0.8" FallbackColor="{ThemeResource SystemChromeMediumColor}" />-->
+    <!--<RevealBackgroundBrush x:Key="SystemControlTransparentRevealBackgroundBrush" TargetTheme="Dark" Color="Transparent" FallbackColor="Transparent" />-->
+    <SolidColorBrush x:Key="SystemControlTransparentRevealBackgroundBrush" Color="Transparent" />
+    <!--<RevealBorderBrush x:Key="SystemControlTransparentRevealBorderBrush" TargetTheme="Dark" Color="Transparent" FallbackColor="Transparent" />-->
+    <SolidColorBrush x:Key="SystemControlTransparentRevealBorderBrush" Color="Transparent" />
 
-    <!-- Default Control Settings -->
-    <FontFamily x:Key="ContentControlThemeFontFamily">XamlAutoFontFamily</FontFamily>
-    <FontFamily x:Key="MTCMediaFontFamily">XamlAutoFontFamily</FontFamily>
-    <FontFamily x:Key="PhoneFontFamilyNormal">Segoe WP</FontFamily>
-    <FontFamily x:Key="PhoneFontFamilySemiLight">Segoe WP SemiLight</FontFamily>
-    <FontFamily x:Key="SettingsFlyoutHeaderThemeFontFamily">XamlAutoFontFamily</FontFamily>
-    <FontFamily x:Key="SymbolThemeFontFamily">Segoe MDL2 Assets</FontFamily>
-    <FontFamily x:Key="KeyTipFontFamily">XamlAutoFontFamily</FontFamily>
-    <x:Double x:Key="AppBarExpandButtonThemeHeight">24</x:Double>
-    <x:Double x:Key="AppBarExpandButtonThemeWidth">48</x:Double>
-    <x:Double x:Key="AppBarThemeMinHeight">56</x:Double>
-    <x:Double x:Key="AppBarThemeMinimalHeight">24</x:Double>
-    <x:Double x:Key="AppBarThemeCompactHeight">40</x:Double>
-    <x:Double x:Key="AppBarExpandButtonCircleDiameter">3</x:Double>
-    <x:Double x:Key="AutoCompleteListMaxHeight">374</x:Double>
-    <x:Double x:Key="AutoCompleteListBorderOpacity">0</x:Double>
-    <Thickness x:Key="CheckBoxBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="CheckBoxCheckedStrokeThickness">0</Thickness>
-    <x:Double x:Key="ComboBoxArrowThemeFontSize">21</x:Double>
-    <x:Double x:Key="ComboBoxThemeMinWidth">64</x:Double>
-    <x:Double x:Key="ComboBoxPopupThemeMinWidth">80</x:Double>
-    <x:Double x:Key="ComboBoxPopupThemeTouchMinWidth">240</x:Double>
-    <x:Double x:Key="ControlContentThemeFontSize">14</x:Double>
-    <x:Double x:Key="ContentControlFontSize">14</x:Double>
-    <x:Double x:Key="ContentDialogMinWidth">320</x:Double>
-    <x:Double x:Key="ContentDialogMaxWidth">548</x:Double>
-    <x:Double x:Key="ContentDialogMinHeight">184</x:Double>
-    <x:Double x:Key="ContentDialogMaxHeight">756</x:Double>
-    <x:Double x:Key="ContentDialogButtonMinWidth">130</x:Double>
-    <x:Double x:Key="ContentDialogButtonMaxWidth">202</x:Double>
-    <x:Double x:Key="ContentDialogButtonMinHeight">32</x:Double>
-    <x:Double x:Key="ContentDialogButtonHeight">32</x:Double>
-    <x:Double x:Key="ContentDialogTitleMaxHeight">56</x:Double>
-    <x:Double x:Key="DatePickerSelectorThemeMinWidth">80</x:Double>
-    <x:Double x:Key="DatePickerSpacingThemeWidth">20</x:Double>
-    <x:Double x:Key="DatePickerSpacingThemeHeight">20</x:Double>
-    <x:Double x:Key="FlyoutThemeMaxHeight">758</x:Double>
-    <x:Double x:Key="FlyoutThemeMaxWidth">456</x:Double>
-    <x:Double x:Key="FlyoutThemeMinHeight">40</x:Double>
-    <x:Double x:Key="FlyoutThemeMinWidth">96</x:Double>
-    <x:Double x:Key="FlyoutThemeTouchMinWidth">240</x:Double>
-    <x:Double x:Key="GridViewItemSelectedBorderThemeThickness">4</x:Double>
-    <x:Double x:Key="HubHeaderThemeFontSize">34</x:Double>
-    <x:Double x:Key="HubSectionHeaderThemeFontSize">20</x:Double>
-    <x:Double x:Key="HubSectionHeaderSeeMoreThemeFontSize">14</x:Double>
-    <x:Double x:Key="ListPickerFlyoutFooterThemeHeight">80</x:Double>
-    <x:Double x:Key="GridViewItemReorderHintThemeOffset">16.0</x:Double>
-    <x:Double x:Key="MTCControlPanelHeight">42</x:Double>
-    <x:Double x:Key="MTCHorizontalVolumeSliderWidth">180</x:Double>
-    <x:Double x:Key="MTCMediaFontSize">12</x:Double>
-    <x:Double x:Key="MTCMediaButtonHeight">48</x:Double>
-    <x:Double x:Key="MTCMediaButtonWidth">48</x:Double>
-    <x:Double x:Key="MTCPositionSliderMinimumWidth">96</x:Double>
-    <x:Double x:Key="MTCSideMargins">16</x:Double>
-    <x:Double x:Key="MTCTimeButtonHeight">21</x:Double>
-    <x:Double x:Key="MTCTimeButtonWidth">62</x:Double>
-    <x:Double x:Key="MTCVerticalVolumeHostVerticalOffset">-112</x:Double>
-    <x:Double x:Key="MTCVerticalVolumeHostWidth">42</x:Double>
-    <x:Double x:Key="MTCVerticalVolumeSliderMaxHeight">289</x:Double>
-    <x:Double x:Key="MTCVerticalVolumeSliderMinHeight">96</x:Double>
-    <x:Double x:Key="MTCVerticalVolumeSliderTopGap">8</x:Double>
-    <x:Double x:Key="MTCVerticalVolumeSliderTopPadding">16</x:Double>
-    <x:Double x:Key="ProgressBarIndicatorPauseOpacity">0.6</x:Double>
-    <x:Double x:Key="ProgressBarThemeMinHeight">4</x:Double>
-    <x:Double x:Key="RadioButtonBorderThemeThickness">2</x:Double>
-    <x:Double x:Key="ScrollBarTrackBorderThemeThickness">0</x:Double>
-    <x:Double x:Key="SearchBoxContentThemeFontSize">14</x:Double>
-    <x:Double x:Key="SearchBoxResultSuggestionImageThemeWidth">32</x:Double>
-    <x:Double x:Key="SearchBoxResultSuggestionImageThemeHeight">32</x:Double>
-    <x:Double x:Key="SearchBoxSuggestionPopupThemeMinWidth">270</x:Double>
-    <x:Double x:Key="SearchBoxSuggestionPopupThemeMaxHeight">300</x:Double>
-    <x:Double x:Key="SearchBoxTextBoxThemeMinHeight">28</x:Double>
-    <x:Double x:Key="SemanticZoomButtonFontSize">4</x:Double>
-    <x:Double x:Key="SettingsFlyoutHeaderThemeFontSize">26.667</x:Double>
 
-    <x:Double x:Key="SliderOutsideTickBarThemeHeight">4</x:Double>
-    <x:Double x:Key="SliderTrackThemeHeight">2</x:Double>
-    <x:Double x:Key="SplitViewOpenPaneThemeLength">320</x:Double>
-    <x:Double x:Key="SplitViewCompactPaneThemeLength">48</x:Double>
-    <x:Double x:Key="TextControlBackgroundThemeOpacity">0.8</x:Double>
-    <x:Double x:Key="TextControlBorderThemeOpacity">0.45</x:Double>
-    <x:Double x:Key="TextControlBorderThemeBrushOpacity">0.5625</x:Double>
-    <x:Double x:Key="TextControlPointerOverBackgroundThemeOpacity">0.87</x:Double>
-    <x:Double x:Key="TextControlPointerOverBorderThemeOpacity">0.73</x:Double>
-    <x:Double x:Key="TextControlPointerOverBorderThemeBrushOpacity">0.839</x:Double>
-    <x:Double x:Key="TextControlBackgroundRestOpacity">0.4</x:Double>
-    <x:Double x:Key="TextControlBackgroundHoverOpacity">0.6</x:Double>
-    <x:Double x:Key="TextControlBackgroundFocusedOpacity">1</x:Double>
-    <x:Double x:Key="TextControlThemeMinHeight">32</x:Double>
-    <x:Double x:Key="TextControlThemeMinWidth">64</x:Double>
-    <x:Double x:Key="TextStyleLargeFontSize">18.14</x:Double>
-    <x:Double x:Key="TextStyleExtraLargeFontSize">25.5</x:Double>
+    <!--<RevealBackgroundBrush x:Key="SystemControlHighlightListLowRevealBackgroundBrush" TargetTheme="Light" Color="{ThemeResource SystemRevealListMediumColor}" FallbackColor="{ StaticResource SystemListMediumColor}" />-->
+    <Color x:Key="RegionColor">#FFFFFFFF</Color>
+    <SolidColorBrush x:Key="RegionBrush" Color="{StaticResource RegionColor}" />
 
-    <x:Double x:Key="TimePickerSelectorThemeMinWidth">80</x:Double>
-    <x:Double x:Key="ToolTipContentThemeFontSize">12</x:Double>
-    <x:Double x:Key="ListViewHeaderItemMinHeight">44</x:Double>
-    <x:Double x:Key="GridViewHeaderItemMinHeight">44</x:Double>
-    <x:Double x:Key="ListViewHeaderItemThemeFontSize">20</x:Double>
-    <x:Double x:Key="GridViewHeaderItemThemeFontSize">20</x:Double>
 
-    <x:Double x:Key="ToggleSwitchOnStrokeThickness">0</x:Double>
-    <x:Double x:Key="GridViewItemMinWidth">44</x:Double>
-    <x:Double x:Key="GridViewItemMinHeight">44</x:Double>
-    <x:Double x:Key="KeyTipContentThemeFontSize">12</x:Double>
-    <Thickness x:Key="AppBarBottomBorderThemeThickness">0,0,0,0</Thickness>
-    <Thickness x:Key="AppBarBottomThemePadding">0,0,0,0</Thickness>
-    <Thickness x:Key="AppBarTopBorderThemeThickness">0,0,0,0</Thickness>
-    <Thickness x:Key="AppBarTopThemePadding">0,0,0,0</Thickness>
-    <Thickness x:Key="AppBarExpandButtonCircleInnerPadding">3,0,3,0</Thickness>
-    <Thickness x:Key="AutoCompleteListBorderThemeThickness">1</Thickness>
+    <x:Double x:Key="AutoCompleteListMaxHeight">374</x:Double>
     <Thickness x:Key="AutoCompleteListMargin">0,2,0,2</Thickness>
+    <Thickness x:Key="AutoCompleteListBorderThemeThickness">1</Thickness>
     <Thickness x:Key="AutoCompleteListPadding">-1,0,-1,0</Thickness>
-    <Thickness x:Key="AutoCompleteListViewItemMargin">12,11,0,13</Thickness>
-    <Thickness x:Key="ButtonBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="CalendarDatePickerBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="ComboBoxBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="ComboBoxDropdownBorderThickness">1</Thickness>
-    <Thickness x:Key="ComboBoxDropdownBorderPadding">0</Thickness>
-    <Thickness x:Key="ComboBoxDropdownContentMargin">0,4,0,4</Thickness>
-    <Thickness x:Key="ComboBoxHeaderThemeMargin">0,0,0,4</Thickness>
-    <Thickness x:Key="ComboBoxPopupBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="ComboBoxItemThemePadding">11,5,11,7</Thickness>
-    <Thickness x:Key="ComboBoxItemThemeTouchPadding">11,11,11,13</Thickness>
-    <Thickness x:Key="ComboBoxItemThemeGameControllerPadding">11,11,11,13</Thickness>
-    <Thickness x:Key="ContentDialogBorderWidth">1</Thickness>
-    <Thickness x:Key="ContentDialogButton1HostMargin">0,0,4,0</Thickness>
-    <Thickness x:Key="ContentDialogButton2HostMargin">0,0,0,0</Thickness>
-    <Thickness x:Key="ContentDialogContentMargin">0,0,0,0</Thickness>
-    <Thickness x:Key="ContentDialogContentScrollViewerMargin">0,0,0,0</Thickness>
-    <Thickness x:Key="ContentDialogCommandSpaceMargin">0,24,0,0</Thickness>
-    <Thickness x:Key="ContentDialogTitleMargin">0,0,0,12</Thickness>
-    <Thickness x:Key="ContentDialogPadding">24,18,24,24</Thickness>
-    <Thickness x:Key="DatePickerHeaderThemeMargin">0,0,0,4</Thickness>
+    <x:Double x:Key="TextControlThemeMinHeight">32</x:Double>
+    <x:Double x:Key="TextControlThemeMinWidth">64</x:Double>
+    <x:Double x:Key="FlyoutThemeMaxWidth">456</x:Double>
+    <Thickness x:Key="DateTimeFlyoutButtonBorderThickness">0</Thickness>
     <Thickness x:Key="DateTimeFlyoutBorderThickness">1</Thickness>
     <Thickness x:Key="DateTimeFlyoutBorderPadding">0</Thickness>
-    <Thickness x:Key="DateTimeFlyoutButtonBorderThickness">0</Thickness>
-    <Thickness x:Key="DateTimeFlyoutContentPanelPortraitThemeMargin">0,37,0,0</Thickness>
-    <Thickness x:Key="DateTimeFlyoutContentPanelLandscapeThemeMargin">0,19,0,0</Thickness>
-    <Thickness x:Key="DateTimeFlyoutTitleThemeMargin">19,0,19,17.5</Thickness>
-    <Thickness x:Key="FlipViewButtonBorderThemeThickness">0</Thickness>
-    <Thickness x:Key="FlyoutContentThemeMargin">0,0,0,0</Thickness>
+
     <Thickness x:Key="FlyoutContentThemePadding">12,11,12,12</Thickness>
-    <Thickness x:Key="GridViewItemCompactSelectedBorderThemeThickness">4</Thickness>
-    <Thickness x:Key="GridViewItemMultiselectBorderThickness">2.5</Thickness>
-    <Thickness x:Key="HandwritingViewExpandedButtonMargin">5,6,5,6</Thickness>
-    <Thickness x:Key="HubSectionHeaderThemeMargin">0,0,0,9</Thickness>
-    <Thickness x:Key="HubSectionHeaderSeeMoreThemeMargin">24,0,0,11</Thickness>
-    <Thickness x:Key="HyperlinkButtonBorderThemeThickness">0</Thickness>
-    <Thickness x:Key="ListPickerFlyoutPresenterMultiselectCheckBoxMargin">0,9.5,0,0</Thickness>
-    <Thickness x:Key="ListPickerFlyoutPresenterItemMargin">0,0,0,19</Thickness>
-    <Thickness x:Key="PickerFlyoutContentPanelLandscapeThemeMargin">19,19,19,0</Thickness>
-    <Thickness x:Key="PickerFlyoutContentPanelPortraitThemeMargin">19,37,19,0</Thickness>
-    <Thickness x:Key="PickerFlyoutTitleThemeMargin">0,0,0,32.5</Thickness>
-    <Thickness x:Key="ProgressBarBorderThemeThickness">0</Thickness>
-    <Thickness x:Key="RepeatButtonBorderThemeThickness">0</Thickness>
-    <Thickness x:Key="ScrollBarPanningBorderThemeThickness">1</Thickness>
-    <Thickness x:Key="SearchBoxQuerySuggestionThemeMargin">12,11,8,13</Thickness>
-    <Thickness x:Key="SearchBoxResultSuggestionThemeMargin">12,11,8,13</Thickness>
-    <Thickness x:Key="SearchBoxSeparatorSuggestionThemeMargin">12,11,8,13</Thickness>
-    <Thickness x:Key="SearchBoxSuggestionSubcomponentThemeMargin">0,0,12,0</Thickness>
-    <Thickness x:Key="SearchBoxThemePadding">12,4,8,4</Thickness>
-    <Thickness x:Key="SearchBoxIMECandidateListSeparatorThemeThickness">0,2,0,0</Thickness>
-    <Thickness x:Key="SearchBoxBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="SliderBorderThemeThickness">0</Thickness>
-    <Thickness x:Key="SliderHeaderThemeMargin">0,0,0,4</Thickness>
-    <Thickness x:Key="SplitViewLeftBorderThemeThickness">0,0,1,0</Thickness>
-    <Thickness x:Key="SplitViewRightBorderThemeThickness">1,0,0,0</Thickness>
-    <Thickness x:Key="TextControlBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="TextControlMarginThemeThickness">0,9.5,0,9.5</Thickness>
-    <Thickness x:Key="TextControlThemePadding">10,3,6,6</Thickness>
-    <Thickness x:Key="HelperButtonThemePadding">0,0,-2,0</Thickness>
-    <Thickness x:Key="TextControlPlaceholderThemePadding">12,5,10,5</Thickness>
-    <Thickness x:Key="TimePickerHeaderThemeMargin">0,0,0,4</Thickness>
-    <Thickness x:Key="TimePickerFirstHostThemeMargin">0,0,20,0</Thickness>
-    <Thickness x:Key="TimePickerThirdHostThemeMargin">20,0,0,0</Thickness>
-    <Thickness x:Key="ToggleButtonBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="KeyTipBorderThemeThickness">1</Thickness>
-    <Thickness x:Key="KeyTipThemePadding">4</Thickness>
-    <FontWeight x:Key="ComboBoxHeaderThemeFontWeight">Normal</FontWeight>
-    <FontWeight x:Key="ComboBoxPlaceholderTextThemeFontWeight">SemiLight</FontWeight>
-    <FontWeight x:Key="DatePickerHeaderThemeFontWeight">Normal</FontWeight>
-    <FontWeight x:Key="SearchBoxButtonThemeFontWeight">Normal</FontWeight>
-    <FontWeight x:Key="SearchBoxContentThemeFontWeight">Normal</FontWeight>
-    <FontWeight x:Key="TimePickerHeaderThemeFontWeight">Normal</FontWeight>
-    <FontWeight x:Key="SliderHeaderThemeFontWeight">Normal</FontWeight>
-    <FontWeight x:Key="HubHeaderThemeFontWeight">Light</FontWeight>
-    <FontWeight x:Key="HubSectionHeaderThemeFontWeight">Normal</FontWeight>
-    <GridLength x:Key="AppBarExpandButtonThemeWidthGridLength">48</GridLength>
-    <Thickness x:Key="MediaTransportControlsTitleSafeBounds">48,0,48,27</Thickness>
+    <x:Double x:Key="FlyoutThemeMinWidth">96</x:Double>
+    <x:Double x:Key="FlyoutThemeMinHeight">40</x:Double>
+    <x:Double x:Key="FlyoutThemeMaxHeight">758</x:Double>
+
+    <!-- Moved from FlyoutPresenter.xaml -->
+    <Thickness x:Key="FlyoutBorderThemePadding">0</Thickness>
+
+    <!-- Moved from MenuItem.xaml -->
+    <Thickness x:Key="MenuFlyoutScrollerMargin">0,4,0,4</Thickness>
+
+    <!-- Moved from Menu.xaml -->
+    <Thickness x:Key="MenuBarItemPadding">12,0,12,0</Thickness>
   </Style.Resources>
 </Style>

+ 0 - 455
src/Avalonia.Themes.Fluent/Accents/FluentBaseDark.xaml

@@ -1,455 +0,0 @@
-<Style xmlns="https://github.com/avaloniaui" 
-  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
-  xmlns:sys="clr-namespace:System;assembly=netstandard">
-  <Style.Resources>
-    <Color x:Key="SystemRevealListLowColor">#18FFFFFF</Color>
-    <Color x:Key="SystemRevealListMediumColor">#30FFFFFF</Color>
-    <!--<AcrylicBrush x:Key="SystemControlAcrylicWindowBrush" BackgroundSource="HostBackdrop" TintColor="{ThemeResource SystemChromeAltHighColor}" TintOpacity="0.8" FallbackColor="{ThemeResource SystemChromeMediumColor}" />-->
-    <!--<RevealBackgroundBrush x:Key="SystemControlTransparentRevealBackgroundBrush" TargetTheme="Dark" Color="Transparent" FallbackColor="Transparent" />-->
-    <SolidColorBrush x:Key="SystemControlTransparentRevealBackgroundBrush" Color="Transparent" />
-    <!--<RevealBorderBrush x:Key="SystemControlTransparentRevealBorderBrush" TargetTheme="Dark" Color="Transparent" FallbackColor="Transparent" />-->
-    <SolidColorBrush x:Key="SystemControlTransparentRevealBorderBrush" Color="Transparent" />
-    
-    <!-- Override system shape defaults -->
-    <CornerRadius x:Key="ControlCornerRadius">3</CornerRadius>
-    <CornerRadius x:Key="OverlayCornerRadius">5</CornerRadius>
-    
-    <!-- Override system borders -->
-    <Thickness x:Key="MenuBarItemBorderThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="GridViewItemMultiselectBorderThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="CheckBoxBorderThemeThickness">1</Thickness>
-    <x:Double x:Key="GridViewItemSelectedBorderThemeThickness">1</x:Double>
-    <x:Double x:Key="RadioButtonBorderThemeThickness">1</x:Double>
-    <Thickness x:Key="ButtonBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="CalendarDatePickerBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="TimePickerBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="DatePickerBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="ToggleSwitchOuterBorderStrokeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="RepeatButtonBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="SearchBoxBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="ToggleButtonBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="TextControlBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="ButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="RepeatButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="ToggleButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="AppBarEllipsisButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="AppBarButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="AppBarToggleButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="ListViewItemRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="GridViewItemRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="ComboBoxItemRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <x:Double x:Key="PersonPictureEllipseBadgeStrokeThickness">1</x:Double>
-    
-    <Color x:Key="RegionColor">#FF000000</Color>
-    <SolidColorBrush x:Key="RegionBrush" Color="{StaticResource RegionColor}" />
-    
-    <!-- BaseResources for Button.xaml -->
-    <StaticResource x:Key="ButtonBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ButtonBackgroundPointerOver" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ButtonBackgroundPressed" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
-    <StaticResource x:Key="ButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ButtonForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ButtonForegroundPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="ButtonForegroundPressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="ButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ButtonBorderBrush" ResourceKey="SystemControlForegroundTransparentBrush" />
-    <StaticResource x:Key="ButtonBorderBrushPointerOver" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="ButtonBorderBrushPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="ButtonBorderBrushDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-
-    <!-- Resources for RepeatButton.xaml -->
-    <StaticResource x:Key="RepeatButtonBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="RepeatButtonBackgroundPointerOver" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="RepeatButtonBackgroundPressed" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
-    <StaticResource x:Key="RepeatButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="RepeatButtonForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="RepeatButtonForegroundPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="RepeatButtonForegroundPressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="RepeatButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="RepeatButtonBorderBrush" ResourceKey="SystemControlForegroundTransparentBrush" />
-    <StaticResource x:Key="RepeatButtonBorderBrushPointerOver" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="RepeatButtonBorderBrushPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="RepeatButtonBorderBrushDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <!-- Resources for Windows.UI.Xaml.Controls.Primitives.ToggleButton -->
-    <StaticResource x:Key="ToggleButtonBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundPointerOver" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundPressed" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundChecked" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundCheckedPointerOver" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundCheckedPressed" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundCheckedDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundIndeterminate" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundIndeterminatePointerOver" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundIndeterminatePressed" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundIndeterminateDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ToggleButtonForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundPressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundChecked" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundCheckedPointerOver" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundCheckedPressed" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundCheckedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundIndeterminate" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundIndeterminatePointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundIndeterminatePressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundIndeterminateDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrush" ResourceKey="SystemControlForegroundTransparentBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushPointerOver" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushChecked" ResourceKey="SystemControlHighlightAltTransparentBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushCheckedPointerOver" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushCheckedPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushCheckedDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushIndeterminate" ResourceKey="SystemControlForegroundTransparentBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushIndeterminatePointerOver" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushIndeterminatePressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushIndeterminateDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-
-    <!-- BaseResources for ComboBox.xaml -->
-    <StaticResource x:Key="ComboBoxItemForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundSelected" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundSelectedUnfocused" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundSelectedPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundSelectedPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundSelectedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxItemBackground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundPressed" ResourceKey="SystemControlHighlightListMediumBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundPointerOver" ResourceKey="SystemControlHighlightListLowBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundSelected" ResourceKey="SystemControlHighlightListAccentLowBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundSelectedUnfocused" ResourceKey="SystemControlHighlightListAccentLowBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundSelectedPressed" ResourceKey="SystemControlHighlightListAccentHighBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundSelectedPointerOver" ResourceKey="SystemControlHighlightListAccentMediumBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundSelectedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrush" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushSelected" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushSelectedUnfocused" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushSelectedPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushSelectedPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushSelectedDisabled" ResourceKey="SystemControlTransparentBrush" />
-
-    <StaticResource x:Key="ComboBoxBackground" ResourceKey="SystemControlBackgroundAltMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxBackgroundPointerOver" ResourceKey="SystemControlPageBackgroundAltMediumBrush" />
-    <StaticResource x:Key="ComboBoxBackgroundPressed" ResourceKey="SystemControlBackgroundListMediumBrush" />
-    <StaticResource x:Key="ComboBoxBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ComboBoxBackgroundUnfocused" ResourceKey="SystemControlHighlightListAccentLowBrush" />
-    <StaticResource x:Key="ComboBoxBackgroundBorderBrushFocused" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="ComboBoxBackgroundBorderBrushUnfocused" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxForegroundFocused" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxForegroundFocusedPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxPlaceHolderForeground" ResourceKey="SystemControlPageTextBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxPlaceHolderForegroundFocusedPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxBorderBrush" ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxBorderBrushPointerOver" ResourceKey="SystemControlHighlightBaseMediumBrush" />
-    <StaticResource x:Key="ComboBoxBorderBrushPressed" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxBorderBrushDisabled" ResourceKey="SystemControlDisabledBaseLowBrush" />
-    <StaticResource x:Key="ComboBoxDropDownBackgroundPointerOver" ResourceKey="SystemControlBackgroundListLowBrush" />
-    <StaticResource x:Key="ComboBoxDropDownBackgroundPointerPressed" ResourceKey="SystemControlBackgroundListMediumBrush" />
-    <StaticResource x:Key="ComboBoxFocusedDropDownBackgroundPointerOver" ResourceKey="SystemControlBackgroundChromeBlackLowBrush" />
-    <StaticResource x:Key="ComboBoxFocusedDropDownBackgroundPointerPressed" ResourceKey="SystemControlBackgroundChromeBlackMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxDropDownGlyphForeground" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
-    <StaticResource x:Key="ComboBoxEditableDropDownGlyphForeground" ResourceKey="SystemControlForegroundAltMediumHighBrush" />
-    <StaticResource x:Key="ComboBoxDropDownGlyphForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxDropDownGlyphForegroundFocused" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
-    <StaticResource x:Key="ComboBoxDropDownGlyphForegroundFocusedPressed" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
-    <StaticResource x:Key="ComboBoxDropDownBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
-    <StaticResource x:Key="ComboBoxDropDownForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxDropDownBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
-
-    <!-- BaseResources for ListBox.xaml -->
-    <Thickness x:Key="ListBoxBorderThemeThickness">0</Thickness>
-    <SolidColorBrush x:Key="ListBoxBackgroundThemeBrush" Color="#CCFFFFFF" />
-    <SolidColorBrush x:Key="ListBoxBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ListBoxDisabledForegroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="ListBoxFocusBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ListBoxForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ListBoxItemDisabledForegroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="ListBoxItemPointerOverBackgroundThemeBrush" Color="#21000000" />
-    <SolidColorBrush x:Key="ListBoxItemPointerOverForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ListBoxItemPressedBackgroundThemeBrush" Color="#FFD3D3D3" />
-    <SolidColorBrush x:Key="ListBoxItemPressedForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedBackgroundThemeBrush" Color="#FF4617B4" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedDisabledBackgroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedDisabledForegroundThemeBrush" Color="#99000000" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedForegroundThemeBrush" Color="White" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedPointerOverBackgroundThemeBrush" Color="#FF5F37BE" />
-    <!-- BaseResources for ProgressBar.xaml -->
-    <SolidColorBrush x:Key="ProgressBarBackgroundThemeBrush" Color="#30000000" />
-    <SolidColorBrush x:Key="ProgressBarBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ProgressBarForegroundThemeBrush" Color="#FF4617B4" />
-    <SolidColorBrush x:Key="ProgressBarIndeterminateForegroundThemeBrush" Color="#FF4617B4" />
-
-    <!-- BaseResources for TextBox.xaml -->
-    <StaticResource x:Key="TextControlForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="TextControlForegroundPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="TextControlForegroundFocused" ResourceKey="SystemControlForegroundChromeBlackHighBrush" />
-    <StaticResource x:Key="TextControlForegroundDisabled" ResourceKey="SystemControlDisabledChromeDisabledLowBrush" />
-    <StaticResource x:Key="TextControlBackground" ResourceKey="SystemControlBackgroundAltMediumLowBrush" />
-    <StaticResource x:Key="TextControlBackgroundPointerOver" ResourceKey="SystemControlBackgroundAltMediumBrush" />
-    <StaticResource x:Key="TextControlBackgroundFocused" ResourceKey="SystemControlBackgroundChromeWhiteBrush" />
-    <StaticResource x:Key="TextControlBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="TextControlBorderBrush" ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
-    <StaticResource x:Key="TextControlBorderBrushPointerOver" ResourceKey="SystemControlHighlightBaseMediumBrush" />
-    <StaticResource x:Key="TextControlBorderBrushFocused" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="TextControlBorderBrushDisabled" ResourceKey="SystemControlDisabledBaseLowBrush" />
-    <StaticResource x:Key="TextControlPlaceholderForeground" ResourceKey="SystemControlPageTextBaseMediumBrush" />
-    <StaticResource x:Key="TextControlPlaceholderForegroundPointerOver" ResourceKey="SystemControlPageTextBaseMediumBrush" />
-    <StaticResource x:Key="TextControlPlaceholderForegroundFocused" ResourceKey="SystemControlPageTextChromeBlackMediumLowBrush" />
-    <StaticResource x:Key="TextControlPlaceholderForegroundDisabled" ResourceKey="SystemControlDisabledChromeDisabledLowBrush" />
-    <StaticResource x:Key="TextControlHeaderForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="TextControlHeaderForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="TextControlSelectionHighlightColor" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="TextControlButtonBackground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TextControlButtonBackgroundPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TextControlButtonBackgroundPressed" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="TextControlButtonBorderBrush" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TextControlButtonBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TextControlButtonBorderBrushPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TextControlButtonForeground" ResourceKey="SystemControlForegroundChromeBlackMediumBrush" />
-    <StaticResource x:Key="TextControlButtonForegroundPointerOver" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="TextControlButtonForegroundPressed" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="ContentLinkForegroundColor" ResourceKey="SystemControlHyperlinkTextBrush" />
-    <StaticResource x:Key="ContentLinkBackgroundColor" ResourceKey="SystemControlPageBackgroundChromeLowBrush" />
-
-    <!-- Resources for AutoCompleteBox.xaml -->
-    <StaticResource x:Key="AutoCompleteBoxLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
-    <StaticResource x:Key="AutoCompleteBoxSuggestionsListBackground" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
-    <StaticResource x:Key="AutoCompleteBoxSuggestionsListBorderBrush" ResourceKey="SystemControlForegroundChromeHighBrush" />
-    <x:Double x:Key="AutoCompleteBoxIconFontSize">12</x:Double>
-
-    <!-- BaseResources for CheckBox.xaml -->
-    <StaticResource x:Key="CheckBoxForegroundUnchecked" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundUncheckedPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundUncheckedPressed" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundUncheckedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CheckBoxForegroundChecked" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundCheckedPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundCheckedPressed" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundCheckedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CheckBoxForegroundIndeterminate" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundIndeterminatePointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundIndeterminatePressed" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundIndeterminateDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundUnchecked" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundUncheckedPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundUncheckedPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundUncheckedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundChecked" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundCheckedPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundCheckedPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundCheckedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundIndeterminate" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundIndeterminatePointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundIndeterminatePressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundIndeterminateDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushUnchecked" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushUncheckedPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushUncheckedPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushUncheckedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushChecked" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushCheckedPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushCheckedPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushCheckedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushIndeterminate" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushIndeterminatePointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushIndeterminatePressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushIndeterminateDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUnchecked" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUncheckedPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUncheckedPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUncheckedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeChecked" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeCheckedPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeCheckedPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeCheckedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeIndeterminate" ResourceKey="SystemControlForegroundAccentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeIndeterminatePointerOver" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeIndeterminatePressed" ResourceKey="SystemControlHighlightBaseMediumBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeIndeterminateDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillUnchecked" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillUncheckedPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillUncheckedPressed" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillUncheckedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillChecked" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillCheckedPointerOver" ResourceKey="SystemControlBackgroundAccentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillCheckedPressed" ResourceKey="SystemControlHighlightBaseMediumBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillCheckedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillIndeterminate" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillIndeterminatePointerOver" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillIndeterminatePressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillIndeterminateDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundUnchecked" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundUncheckedPointerOver" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundUncheckedPressed" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundUncheckedDisabled" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundChecked" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundCheckedPointerOver" ResourceKey="SystemControlForegroundChromeWhiteBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundCheckedPressed" ResourceKey="SystemControlForegroundChromeWhiteBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundCheckedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundIndeterminate" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundIndeterminatePointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundIndeterminatePressed" ResourceKey="SystemControlForegroundBaseMediumBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundIndeterminateDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    
-    <!-- BaseResources for RadioButton.xaml -->
-    <StaticResource x:Key="RadioButtonForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="RadioButtonForegroundPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="RadioButtonForegroundPressed" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="RadioButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="RadioButtonBackground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonBackgroundPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonBackgroundPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonBorderBrush" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonBorderBrushPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonBorderBrushDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseStroke" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseStrokePointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseStrokePressed" ResourceKey="SystemControlHighlightBaseMediumBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseStrokeDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseFill" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseFillPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseFillPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseFillDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseCheckedStroke" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseCheckedStrokePointerOver" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseCheckedStrokePressed" ResourceKey="SystemControlHighlightBaseMediumBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseCheckedStrokeDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseCheckedFill" ResourceKey="SystemControlHighlightAltTransparentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseCheckedFillPointerOver" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseCheckedFillPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseCheckedFillDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonCheckGlyphFill" ResourceKey="SystemControlHighlightBaseMediumHighBrush" />
-    <StaticResource x:Key="RadioButtonCheckGlyphFillPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="RadioButtonCheckGlyphFillPressed" ResourceKey="SystemControlHighlightAltBaseMediumBrush" />
-    <StaticResource x:Key="RadioButtonCheckGlyphFillDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="RadioButtonCheckGlyphStroke" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonCheckGlyphStrokePointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonCheckGlyphStrokePressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonCheckGlyphStrokeDisabled" ResourceKey="SystemControlTransparentBrush" />
-    
-    <!-- BaseResources for Slider.xaml -->
-    <StaticResource x:Key="SliderContainerBackground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="SliderContainerBackgroundPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="SliderContainerBackgroundPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="SliderContainerBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="SliderThumbBackground" ResourceKey="SystemControlForegroundAccentBrush" />
-    <StaticResource x:Key="SliderThumbBackgroundPointerOver" ResourceKey="SystemControlHighlightChromeAltLowBrush" />
-    <StaticResource x:Key="SliderThumbBackgroundPressed" ResourceKey="SystemControlHighlightChromeHighBrush" />
-    <StaticResource x:Key="SliderThumbBackgroundDisabled" ResourceKey="SystemControlDisabledChromeDisabledHighBrush" />
-    <StaticResource x:Key="SliderTrackFill" ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
-    <StaticResource x:Key="SliderTrackFillPointerOver" ResourceKey="SystemControlForegroundBaseMediumBrush" />
-    <StaticResource x:Key="SliderTrackFillPressed" ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
-    <StaticResource x:Key="SliderTrackFillDisabled" ResourceKey="SystemControlDisabledChromeDisabledHighBrush" />
-    <StaticResource x:Key="SliderTrackValueFill" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="SliderTrackValueFillPointerOver" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="SliderTrackValueFillPressed" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="SliderTrackValueFillDisabled" ResourceKey="SystemControlDisabledChromeDisabledHighBrush" />
-    <StaticResource x:Key="SliderHeaderForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="SliderHeaderForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="SliderTickBarFill" ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
-    <StaticResource x:Key="SliderTickBarFillDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="SliderInlineTickBarFill" ResourceKey="SystemControlBackgroundAltHighBrush" />
-
-    <!-- Resources for ToolTip.xaml -->
-    <x:Double x:Key="ToolTipContentThemeFontSize">12</x:Double>
-    <Thickness x:Key="ToolTipBorderThemeThickness">1</Thickness>
-    <StaticResource x:Key="ToolTipForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ToolTipBackground" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
-    <StaticResource x:Key="ToolTipBorderBrush" ResourceKey="SystemControlForegroundChromeHighBrush" />
-    <SolidColorBrush x:Key="ToolTipBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToolTipBorderThemeBrush" Color="#FF808080" />
-    <SolidColorBrush x:Key="ToolTipForegroundThemeBrush" Color="#FF666666" />
-
-    <!-- Resources for TabItem.xaml -->
-    <FontFamily x:Key="TabItemHeaderFontFamily">XamlAutoFontFamily</FontFamily>
-    <x:Double x:Key="TabItemHeaderFontSize">24</x:Double>
-    <x:Double x:Key="TabItemHeaderLockedTranslation">40</x:Double>
-    <x:Int32 x:Key="TabItemHeaderCharacterSpacing">-25</x:Int32>
-    <Thickness x:Key="TabItemHeaderMargin">12,0,12,0</Thickness>
-    <Thickness x:Key="TabItemMargin">12,0,12,0</Thickness>
-    <FontWeight x:Key="TabItemHeaderThemeFontWeight">SemiLight</FontWeight>
-    <StaticResource x:Key="TabControlBackground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderBackground" ResourceKey="SystemControlTransparentBrush" />
-    <!-- Resources for TabItem -->
-    <StaticResource x:Key="TabItemHeaderBackgroundUnselected" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderBackgroundUnselectedPointerOver" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderBackgroundUnselectedPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderBackgroundSelected" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderBackgroundSelectedPointerOver" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderBackgroundSelectedPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderForegroundUnselected" ResourceKey="SystemControlForegroundBaseMediumBrush" />
-    <StaticResource x:Key="TabItemHeaderForegroundUnselectedPointerOver" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
-    <StaticResource x:Key="TabItemHeaderForegroundUnselectedPressed" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
-    <StaticResource x:Key="TabItemHeaderForegroundSelected" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="TabItemHeaderForegroundSelectedPointerOver" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
-    <StaticResource x:Key="TabItemHeaderForegroundSelectedPressed" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
-    <StaticResource x:Key="TabItemHeaderForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="TabItemHeaderFocusPipeFill" ResourceKey="SystemControlHighlightAltAccentBrush" />
-    <StaticResource x:Key="TabItemHeaderSelectedPipeFill" ResourceKey="SystemControlHighlightAltAccentBrush" />
-
-    <!-- BaseResources for ScrollBar.xaml -->
-    <StaticResource x:Key="ScrollBarBackground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarBackgroundPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarForeground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarBorderBrush" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarBorderBrushDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarButtonBackground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarButtonBackgroundPointerOver" ResourceKey="SystemControlBackgroundListLowBrush" />
-    <StaticResource x:Key="ScrollBarButtonBackgroundPressed" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
-    <StaticResource x:Key="ScrollBarButtonBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarButtonBorderBrush" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarButtonBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarButtonBorderBrushPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarButtonBorderBrushDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarButtonArrowForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ScrollBarButtonArrowForegroundPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ScrollBarButtonArrowForegroundPressed" ResourceKey="SystemControlForegroundAltHighBrush" />
-    <StaticResource x:Key="ScrollBarButtonArrowForegroundDisabled" ResourceKey="SystemControlForegroundBaseLowBrush" />
-    <StaticResource x:Key="ScrollBarThumbFill" ResourceKey="SystemControlForegroundChromeDisabledLowBrush" />
-    <StaticResource x:Key="ScrollBarThumbFillPointerOver" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
-    <StaticResource x:Key="ScrollBarThumbFillPressed" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
-    <StaticResource x:Key="ScrollBarThumbFillDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <SolidColorBrush x:Key="ScrollBarTrackFill" Color="{StaticResource SystemChromeMediumColor}" Opacity="0.9" />
-    <SolidColorBrush x:Key="ScrollBarTrackFillPointerOver" Color="{StaticResource SystemChromeMediumColor}" Opacity="0.9" />
-    <StaticResource x:Key="ScrollBarTrackFillDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <StaticResource x:Key="ScrollBarTrackStroke" ResourceKey="SystemControlForegroundTransparentBrush" />
-    <StaticResource x:Key="ScrollBarTrackStrokePointerOver" ResourceKey="SystemControlForegroundTransparentBrush" />
-    <StaticResource x:Key="ScrollBarTrackStrokeDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <StaticResource x:Key="ScrollBarPanningThumbBackgroundDisabled" ResourceKey="SystemControlDisabledChromeHighBrush" />
-    <StaticResource x:Key="ScrollBarThumbBackgroundColor" ResourceKey="SystemBaseLowColor" />
-    <StaticResource x:Key="ScrollBarPanningThumbBackgroundColor" ResourceKey="SystemChromeDisabledLowColor" />
-    <SolidColorBrush x:Key="ScrollBarThumbBackground" Color="{StaticResource ScrollBarThumbBackgroundColor}" />
-    <SolidColorBrush x:Key="ScrollBarPanningThumbBackground" Color="{StaticResource ScrollBarPanningThumbBackgroundColor}" />
-    <x:TimeSpan x:Key="ScrollBarExpandDuration">00:00:00.1</x:TimeSpan>
-    <x:String x:Key="ScrollBarExpandBeginTime">00:00:00.40</x:String>
-    <x:String x:Key="ScrollBarContractBeginTime">00:00:02.00</x:String>
-    <x:String x:Key="ScrollBarContractDelay">00:00:02</x:String>
-    <x:String x:Key="ScrollBarContractDuration">00:00:00.1</x:String>
-    <x:String x:Key="ScrollBarContractFinalKeyframe">00:00:02.1</x:String>
-    <x:Double x:Key="ScrollBarSize">16</x:Double>
-    <x:Double x:Key="SmallScrollThumbScale">0.125</x:Double>
-    <x:Double x:Key="SmallScrollThumbOffset">-2</x:Double>
-    <TransformOperations x:Key="VerticalSmallScrollThumbScaleTransform">scaleX(0.125) translateX(-2px)</TransformOperations>
-    <TransformOperations x:Key="HorizontalSmallScrollThumbScaleTransform">scaleY(0.125) translateY(-2px)</TransformOperations>
-    <x:Double x:Key="ScrollBarButtonArrowIconFontSize">8</x:Double>
-
-    <!-- BaseResources for ScrollViewer.xaml -->
-    <SolidColorBrush x:Key="ScrollViewerScrollBarsSeparatorBackground" Color="{StaticResource SystemChromeMediumColor}" Opacity="0.9" />
-  </Style.Resources>
-</Style>

+ 0 - 458
src/Avalonia.Themes.Fluent/Accents/FluentBaseLight.xaml

@@ -1,458 +0,0 @@
-<Style xmlns="https://github.com/avaloniaui" 
-  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
-  xmlns:sys="clr-namespace:System;assembly=netstandard">
-  <Style.Resources>
-    <Color x:Key="SystemRevealListLowColor">#17000000</Color>
-    <Color x:Key="SystemRevealListMediumColor">#2E000000</Color>
-    <!--<AcrylicBrush x:Key="SystemControlAcrylicWindowBrush" BackgroundSource="HostBackdrop" TintColor="{ThemeResource SystemChromeAltHighColor}" TintOpacity="0.8" FallbackColor="{ThemeResource SystemChromeMediumColor}" />-->
-    <!--<RevealBackgroundBrush x:Key="SystemControlTransparentRevealBackgroundBrush" TargetTheme="Dark" Color="Transparent" FallbackColor="Transparent" />-->
-    <SolidColorBrush x:Key="SystemControlTransparentRevealBackgroundBrush" Color="Transparent" />
-    <!--<RevealBorderBrush x:Key="SystemControlTransparentRevealBorderBrush" TargetTheme="Dark" Color="Transparent" FallbackColor="Transparent" />-->
-    <SolidColorBrush x:Key="SystemControlTransparentRevealBorderBrush" Color="Transparent" />
-    
-    <!-- Override system shape defaults -->
-    <CornerRadius x:Key="ControlCornerRadius">3</CornerRadius>
-    <CornerRadius x:Key="OverlayCornerRadius">5</CornerRadius>
-    
-    <!-- Override system borders -->
-    <Thickness x:Key="MenuBarItemBorderThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="GridViewItemMultiselectBorderThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="CheckBoxBorderThemeThickness">1</Thickness>
-    <x:Double x:Key="GridViewItemSelectedBorderThemeThickness">1</x:Double>
-    <x:Double x:Key="RadioButtonBorderThemeThickness">1</x:Double>
-    <Thickness x:Key="ButtonBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="CalendarDatePickerBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="TimePickerBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="DatePickerBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="ToggleSwitchOuterBorderStrokeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="RepeatButtonBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="SearchBoxBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="ToggleButtonBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="TextControlBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="ButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="RepeatButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="ToggleButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="AppBarEllipsisButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="AppBarButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="AppBarToggleButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="ListViewItemRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="GridViewItemRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <Thickness x:Key="ComboBoxItemRevealBorderThemeThickness">1,1,1,1</Thickness>
-    <x:Double x:Key="PersonPictureEllipseBadgeStrokeThickness">1</x:Double>
-    
-    <!--<RevealBackgroundBrush x:Key="SystemControlHighlightListLowRevealBackgroundBrush" TargetTheme="Light" Color="{ThemeResource SystemRevealListMediumColor}" FallbackColor="{ StaticResource SystemListMediumColor}" />-->
-    <Color x:Key="RegionColor">#FFFFFFFF</Color>
-    <SolidColorBrush x:Key="RegionBrush" Color="{StaticResource RegionColor}" />
-    
-    <!-- BaseResources for Button.xaml -->
-    <StaticResource x:Key="ButtonBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ButtonBackgroundPointerOver" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ButtonBackgroundPressed" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
-    <StaticResource x:Key="ButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ButtonForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ButtonForegroundPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="ButtonForegroundPressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="ButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ButtonBorderBrush" ResourceKey="SystemControlForegroundTransparentBrush" />
-    <StaticResource x:Key="ButtonBorderBrushPointerOver" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="ButtonBorderBrushPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="ButtonBorderBrushDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-
-    <!-- Resources for RepeatButton.xaml -->
-    <StaticResource x:Key="RepeatButtonBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="RepeatButtonBackgroundPointerOver" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="RepeatButtonBackgroundPressed" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
-    <StaticResource x:Key="RepeatButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="RepeatButtonForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="RepeatButtonForegroundPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="RepeatButtonForegroundPressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="RepeatButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="RepeatButtonBorderBrush" ResourceKey="SystemControlForegroundTransparentBrush" />
-    <StaticResource x:Key="RepeatButtonBorderBrushPointerOver" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="RepeatButtonBorderBrushPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="RepeatButtonBorderBrushDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-
-    <!-- Resources for ToggleButton.xaml -->
-    <StaticResource x:Key="ToggleButtonBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundPointerOver" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundPressed" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundChecked" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundCheckedPointerOver" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundCheckedPressed" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundCheckedDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundIndeterminate" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundIndeterminatePointerOver" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundIndeterminatePressed" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonBackgroundIndeterminateDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ToggleButtonForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundPressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundChecked" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundCheckedPointerOver" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundCheckedPressed" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundCheckedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundIndeterminate" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundIndeterminatePointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundIndeterminatePressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="ToggleButtonForegroundIndeterminateDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrush" ResourceKey="SystemControlForegroundTransparentBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushPointerOver" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushChecked" ResourceKey="SystemControlHighlightAltTransparentBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushCheckedPointerOver" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushCheckedPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushCheckedDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushIndeterminate" ResourceKey="SystemControlForegroundTransparentBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushIndeterminatePointerOver" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushIndeterminatePressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="ToggleButtonBorderBrushIndeterminateDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    
-    <!-- BaseResources for ComboBox.xaml -->
-    <StaticResource x:Key="ComboBoxItemForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundSelected" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundSelectedUnfocused" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundSelectedPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundSelectedPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundSelectedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxItemBackground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundPressed" ResourceKey="SystemControlHighlightListMediumBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundPointerOver" ResourceKey="SystemControlHighlightListLowBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundSelected" ResourceKey="SystemControlHighlightListAccentLowBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundSelectedUnfocused" ResourceKey="SystemControlHighlightListAccentLowBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundSelectedPressed" ResourceKey="SystemControlHighlightListAccentHighBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundSelectedPointerOver" ResourceKey="SystemControlHighlightListAccentMediumBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundSelectedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrush" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushSelected" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushSelectedUnfocused" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushSelectedPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushSelectedPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushSelectedDisabled" ResourceKey="SystemControlTransparentBrush" />    
-
-    <StaticResource x:Key="ComboBoxBackground" ResourceKey="SystemControlBackgroundAltMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxBackgroundPointerOver" ResourceKey="SystemControlPageBackgroundAltMediumBrush" />
-    <StaticResource x:Key="ComboBoxBackgroundPressed" ResourceKey="SystemControlBackgroundListMediumBrush" />
-    <StaticResource x:Key="ComboBoxBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ComboBoxBackgroundUnfocused" ResourceKey="SystemControlHighlightListAccentLowBrush" />
-    <StaticResource x:Key="ComboBoxBackgroundBorderBrushFocused" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="ComboBoxBackgroundBorderBrushUnfocused" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxForegroundFocused" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxForegroundFocusedPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxPlaceHolderForeground" ResourceKey="SystemControlPageTextBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxPlaceHolderForegroundFocusedPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxBorderBrush" ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxBorderBrushPointerOver" ResourceKey="SystemControlHighlightBaseMediumBrush" />
-    <StaticResource x:Key="ComboBoxBorderBrushPressed" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxBorderBrushDisabled" ResourceKey="SystemControlDisabledBaseLowBrush" />
-    <StaticResource x:Key="ComboBoxDropDownBackgroundPointerOver" ResourceKey="SystemControlBackgroundListLowBrush" />
-    <StaticResource x:Key="ComboBoxDropDownBackgroundPointerPressed" ResourceKey="SystemControlBackgroundListMediumBrush" />
-    <StaticResource x:Key="ComboBoxFocusedDropDownBackgroundPointerOver" ResourceKey="SystemControlBackgroundChromeBlackLowBrush" />
-    <StaticResource x:Key="ComboBoxFocusedDropDownBackgroundPointerPressed" ResourceKey="SystemControlBackgroundChromeBlackMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxDropDownGlyphForeground" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
-    <StaticResource x:Key="ComboBoxEditableDropDownGlyphForeground" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
-    <StaticResource x:Key="ComboBoxDropDownGlyphForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxDropDownGlyphForegroundFocused" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
-    <StaticResource x:Key="ComboBoxDropDownGlyphForegroundFocusedPressed" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
-    <StaticResource x:Key="ComboBoxDropDownBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
-    <StaticResource x:Key="ComboBoxDropDownForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxDropDownBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
-    
-    <!-- BaseResources for Listbox.xaml -->
-    <Thickness x:Key="ListBoxBorderThemeThickness">0</Thickness>
-    <SolidColorBrush x:Key="ListBoxBackgroundThemeBrush" Color="#CCFFFFFF" />
-    <SolidColorBrush x:Key="ListBoxBorderThemeBrush" Color="#45000000" />
-    <SolidColorBrush x:Key="ListBoxDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="ListBoxFocusBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ListBoxForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ListBoxItemDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="ListBoxItemPointerOverBackgroundThemeBrush" Color="#21000000" />
-    <SolidColorBrush x:Key="ListBoxItemPointerOverForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ListBoxItemPressedBackgroundThemeBrush" Color="#FFD3D3D3" />
-    <SolidColorBrush x:Key="ListBoxItemPressedForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedBackgroundThemeBrush" Color="#FF4617B4" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedDisabledBackgroundThemeBrush" Color="#8C000000" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedDisabledForegroundThemeBrush" Color="#99FFFFFF" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedForegroundThemeBrush" Color="White" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedPointerOverBackgroundThemeBrush" Color="#FF5F37BE" />
-    
-    <!-- BaseResources for ProgressBar.xaml -->
-    <SolidColorBrush x:Key="ProgressBarBackgroundThemeBrush" Color="#59FFFFFF" />
-    <SolidColorBrush x:Key="ProgressBarBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ProgressBarForegroundThemeBrush" Color="#FF5B2EC5" />
-    <SolidColorBrush x:Key="ProgressBarIndeterminateForegroundThemeBrush" Color="#FF8A57FF" />
-
-    <!-- BaseResources for TextBox.xaml -->
-    <StaticResource x:Key="TextControlForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="TextControlForegroundPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="TextControlForegroundFocused" ResourceKey="SystemControlForegroundChromeBlackHighBrush" />
-    <StaticResource x:Key="TextControlForegroundDisabled" ResourceKey="SystemControlDisabledChromeDisabledLowBrush" />
-    <StaticResource x:Key="TextControlBackground" ResourceKey="SystemControlBackgroundAltMediumLowBrush" />
-    <StaticResource x:Key="TextControlBackgroundPointerOver" ResourceKey="SystemControlBackgroundAltMediumBrush" />
-    <StaticResource x:Key="TextControlBackgroundFocused" ResourceKey="SystemControlBackgroundChromeWhiteBrush" />
-    <StaticResource x:Key="TextControlBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="TextControlBorderBrush" ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
-    <StaticResource x:Key="TextControlBorderBrushPointerOver" ResourceKey="SystemControlHighlightBaseMediumBrush" />
-    <StaticResource x:Key="TextControlBorderBrushFocused" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="TextControlBorderBrushDisabled" ResourceKey="SystemControlDisabledBaseLowBrush" />
-    <StaticResource x:Key="TextControlPlaceholderForeground" ResourceKey="SystemControlPageTextBaseMediumBrush" />
-    <StaticResource x:Key="TextControlPlaceholderForegroundPointerOver" ResourceKey="SystemControlPageTextBaseMediumBrush" />
-    <StaticResource x:Key="TextControlPlaceholderForegroundFocused" ResourceKey="SystemControlPageTextChromeBlackMediumLowBrush" />
-    <StaticResource x:Key="TextControlPlaceholderForegroundDisabled" ResourceKey="SystemControlDisabledChromeDisabledLowBrush" />
-    <StaticResource x:Key="TextControlHeaderForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="TextControlHeaderForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="TextControlSelectionHighlightColor" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="TextControlButtonBackground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TextControlButtonBackgroundPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TextControlButtonBackgroundPressed" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="TextControlButtonBorderBrush" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TextControlButtonBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TextControlButtonBorderBrushPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TextControlButtonForeground" ResourceKey="SystemControlForegroundChromeBlackMediumBrush" />
-    <StaticResource x:Key="TextControlButtonForegroundPointerOver" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="TextControlButtonForegroundPressed" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="ContentLinkForegroundColor" ResourceKey="SystemControlHyperlinkTextBrush" />
-    <StaticResource x:Key="ContentLinkBackgroundColor" ResourceKey="SystemControlPageBackgroundChromeLowBrush" />
-
-    <!-- Resources for AutoCompleteBox.xaml -->
-    <StaticResource x:Key="AutoCompleteBoxLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
-    <StaticResource x:Key="AutoCompleteBoxSuggestionsListBackground" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
-    <StaticResource x:Key="AutoCompleteBoxSuggestionsListBorderBrush" ResourceKey="SystemControlForegroundChromeHighBrush" />
-    <x:Double x:Key="AutoCompleteBoxIconFontSize">12</x:Double>
-
-    <!-- BaseResources for CheckBox.xaml -->
-    <StaticResource x:Key="CheckBoxForegroundUnchecked" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundUncheckedPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundUncheckedPressed" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundUncheckedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CheckBoxForegroundChecked" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundCheckedPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundCheckedPressed" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundCheckedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CheckBoxForegroundIndeterminate" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundIndeterminatePointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundIndeterminatePressed" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxForegroundIndeterminateDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundUnchecked" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundUncheckedPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundUncheckedPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundUncheckedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundChecked" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundCheckedPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundCheckedPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundCheckedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundIndeterminate" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundIndeterminatePointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundIndeterminatePressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBackgroundIndeterminateDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushUnchecked" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushUncheckedPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushUncheckedPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushUncheckedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushChecked" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushCheckedPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushCheckedPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushCheckedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushIndeterminate" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushIndeterminatePointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushIndeterminatePressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxBorderBrushIndeterminateDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUnchecked" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUncheckedPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUncheckedPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUncheckedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeChecked" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeCheckedPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeCheckedPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeCheckedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeIndeterminate" ResourceKey="SystemControlForegroundAccentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeIndeterminatePointerOver" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeIndeterminatePressed" ResourceKey="SystemControlHighlightBaseMediumBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeIndeterminateDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillUnchecked" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillUncheckedPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillUncheckedPressed" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillUncheckedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillChecked" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillCheckedPointerOver" ResourceKey="SystemControlBackgroundAccentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillCheckedPressed" ResourceKey="SystemControlHighlightBaseMediumBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillCheckedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillIndeterminate" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillIndeterminatePointerOver" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillIndeterminatePressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundFillIndeterminateDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundUnchecked" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundUncheckedPointerOver" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundUncheckedPressed" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundUncheckedDisabled" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundChecked" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundCheckedPointerOver" ResourceKey="SystemControlForegroundChromeWhiteBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundCheckedPressed" ResourceKey="SystemControlForegroundChromeWhiteBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundCheckedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundIndeterminate" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundIndeterminatePointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundIndeterminatePressed" ResourceKey="SystemControlForegroundBaseMediumBrush" />
-    <StaticResource x:Key="CheckBoxCheckGlyphForegroundIndeterminateDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    
-    <!-- BaseResources for RadioButton.xaml -->
-    <StaticResource x:Key="RadioButtonForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="RadioButtonForegroundPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="RadioButtonForegroundPressed" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="RadioButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="RadioButtonBackground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonBackgroundPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonBackgroundPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonBorderBrush" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonBorderBrushPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonBorderBrushDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseStroke" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseStrokePointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseStrokePressed" ResourceKey="SystemControlHighlightBaseMediumBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseStrokeDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseFill" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseFillPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseFillPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseFillDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseCheckedStroke" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseCheckedStrokePointerOver" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseCheckedStrokePressed" ResourceKey="SystemControlHighlightBaseMediumBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseCheckedStrokeDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseCheckedFill" ResourceKey="SystemControlHighlightAltTransparentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseCheckedFillPointerOver" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseCheckedFillPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="RadioButtonOuterEllipseCheckedFillDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonCheckGlyphFill" ResourceKey="SystemControlHighlightBaseMediumHighBrush" />
-    <StaticResource x:Key="RadioButtonCheckGlyphFillPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="RadioButtonCheckGlyphFillPressed" ResourceKey="SystemControlHighlightAltBaseMediumBrush" />
-    <StaticResource x:Key="RadioButtonCheckGlyphFillDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="RadioButtonCheckGlyphStroke" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonCheckGlyphStrokePointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonCheckGlyphStrokePressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="RadioButtonCheckGlyphStrokeDisabled" ResourceKey="SystemControlTransparentBrush" />
-    
-    <!-- BaseResources for Slider.xaml -->
-    <StaticResource x:Key="SliderContainerBackground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="SliderContainerBackgroundPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="SliderContainerBackgroundPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="SliderContainerBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="SliderThumbBackground" ResourceKey="SystemControlForegroundAccentBrush" />
-    <StaticResource x:Key="SliderThumbBackgroundPointerOver" ResourceKey="SystemControlHighlightChromeAltLowBrush" />
-    <StaticResource x:Key="SliderThumbBackgroundPressed" ResourceKey="SystemControlHighlightChromeHighBrush" />
-    <StaticResource x:Key="SliderThumbBackgroundDisabled" ResourceKey="SystemControlDisabledChromeDisabledHighBrush" />
-    <StaticResource x:Key="SliderTrackFill" ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
-    <StaticResource x:Key="SliderTrackFillPointerOver" ResourceKey="SystemControlForegroundBaseMediumBrush" />
-    <StaticResource x:Key="SliderTrackFillPressed" ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
-    <StaticResource x:Key="SliderTrackFillDisabled" ResourceKey="SystemControlDisabledChromeDisabledHighBrush" />
-    <StaticResource x:Key="SliderTrackValueFill" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="SliderTrackValueFillPointerOver" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="SliderTrackValueFillPressed" ResourceKey="SystemControlHighlightAccentBrush" />
-    <StaticResource x:Key="SliderTrackValueFillDisabled" ResourceKey="SystemControlDisabledChromeDisabledHighBrush" />
-    <StaticResource x:Key="SliderHeaderForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="SliderHeaderForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="SliderTickBarFill" ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
-    <StaticResource x:Key="SliderTickBarFillDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="SliderInlineTickBarFill" ResourceKey="SystemControlBackgroundAltHighBrush" />
-
-    <!-- Resources for ToolTip.xaml -->
-    <x:Double x:Key="ToolTipContentThemeFontSize">12</x:Double>
-    <Thickness x:Key="ToolTipBorderThemeThickness">1</Thickness>
-    <StaticResource x:Key="ToolTipForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ToolTipBackground" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
-    <StaticResource x:Key="ToolTipBorderBrush" ResourceKey="SystemControlForegroundChromeHighBrush" />
-    <SolidColorBrush x:Key="ToolTipBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToolTipBorderThemeBrush" Color="#FF808080" />
-    <SolidColorBrush x:Key="ToolTipForegroundThemeBrush" Color="#FF666666" />
-
-    <!-- Resources for TabItem.xaml -->
-    <FontFamily x:Key="TabItemHeaderFontFamily">XamlAutoFontFamily</FontFamily>
-    <x:Double x:Key="TabItemHeaderFontSize">24</x:Double>
-    <x:Double x:Key="TabItemHeaderLockedTranslation">40</x:Double>
-    <x:Int32 x:Key="TabItemHeaderCharacterSpacing">-25</x:Int32>
-    <Thickness x:Key="TabItemHeaderMargin">12,0,12,0</Thickness>
-    <Thickness x:Key="TabItemMargin">12,0,12,0</Thickness>
-    <FontWeight x:Key="TabItemHeaderThemeFontWeight">SemiLight</FontWeight>
-    <StaticResource x:Key="TabControlBackground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderBackground" ResourceKey="SystemControlTransparentBrush" />
-    <!-- Resources for TabItem -->
-    <StaticResource x:Key="TabItemHeaderBackgroundUnselected" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderBackgroundUnselectedPointerOver" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderBackgroundUnselectedPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderBackgroundSelected" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderBackgroundSelectedPointerOver" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderBackgroundSelectedPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderForegroundUnselected" ResourceKey="SystemControlForegroundBaseMediumBrush" />
-    <StaticResource x:Key="TabItemHeaderForegroundUnselectedPointerOver" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
-    <StaticResource x:Key="TabItemHeaderForegroundUnselectedPressed" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
-    <StaticResource x:Key="TabItemHeaderForegroundSelected" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="TabItemHeaderForegroundSelectedPointerOver" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
-    <StaticResource x:Key="TabItemHeaderForegroundSelectedPressed" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
-    <StaticResource x:Key="TabItemHeaderForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="TabItemHeaderFocusPipeFill" ResourceKey="SystemControlHighlightAltAccentBrush" />
-    <StaticResource x:Key="TabItemHeaderSelectedPipeFill" ResourceKey="SystemControlHighlightAltAccentBrush" />
-
-    <!-- BaseResources for ScrollBar.xaml -->
-    <StaticResource x:Key="ScrollBarBackground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarBackgroundPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarForeground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarBorderBrush" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarBorderBrushDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarButtonBackground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarButtonBackgroundPointerOver" ResourceKey="SystemControlBackgroundListLowBrush" />
-    <StaticResource x:Key="ScrollBarButtonBackgroundPressed" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
-    <StaticResource x:Key="ScrollBarButtonBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarButtonBorderBrush" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarButtonBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarButtonBorderBrushPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarButtonBorderBrushDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarButtonArrowForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ScrollBarButtonArrowForegroundPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ScrollBarButtonArrowForegroundPressed" ResourceKey="SystemControlForegroundAltHighBrush" />
-    <StaticResource x:Key="ScrollBarButtonArrowForegroundDisabled" ResourceKey="SystemControlForegroundBaseLowBrush" />
-    <StaticResource x:Key="ScrollBarThumbFill" ResourceKey="SystemControlForegroundChromeDisabledLowBrush" />
-    <StaticResource x:Key="ScrollBarThumbFillPointerOver" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
-    <StaticResource x:Key="ScrollBarThumbFillPressed" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
-    <StaticResource x:Key="ScrollBarThumbFillDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <SolidColorBrush x:Key="ScrollBarTrackFill" Color="{StaticResource SystemChromeMediumColor}" Opacity="0.9" />
-    <SolidColorBrush x:Key="ScrollBarTrackFillPointerOver" Color="{StaticResource SystemChromeMediumColor}" Opacity="0.9" />
-    <StaticResource x:Key="ScrollBarTrackFillDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <StaticResource x:Key="ScrollBarTrackStroke" ResourceKey="SystemControlForegroundTransparentBrush" />
-    <StaticResource x:Key="ScrollBarTrackStrokePointerOver" ResourceKey="SystemControlForegroundTransparentBrush" />
-    <StaticResource x:Key="ScrollBarTrackStrokeDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <StaticResource x:Key="ScrollBarPanningThumbBackgroundDisabled" ResourceKey="SystemControlDisabledChromeHighBrush" />
-    <StaticResource x:Key="ScrollBarThumbBackgroundColor" ResourceKey="SystemBaseLowColor" />
-    <StaticResource x:Key="ScrollBarPanningThumbBackgroundColor" ResourceKey="SystemChromeDisabledLowColor" />
-    <SolidColorBrush x:Key="ScrollBarThumbBackground" Color="{StaticResource ScrollBarThumbBackgroundColor}" />
-    <SolidColorBrush x:Key="ScrollBarPanningThumbBackground" Color="{StaticResource ScrollBarPanningThumbBackgroundColor}" />
-    <x:String x:Key="ScrollBarExpandDuration">00:00:00.1</x:String>
-    <x:String x:Key="ScrollBarExpandBeginTime">00:00:00.40</x:String>
-    <x:String x:Key="ScrollBarContractBeginTime">00:00:02.00</x:String>
-    <x:String x:Key="ScrollBarContractDelay">00:00:02</x:String>
-    <x:String x:Key="ScrollBarContractDuration">00:00:00.1</x:String>
-    <x:String x:Key="ScrollBarContractFinalKeyframe">00:00:02.1</x:String>
-    <x:Double x:Key="ScrollBarSize">16</x:Double>
-    <x:Double x:Key="SmallScrollThumbScale">0.125</x:Double>
-    <x:Double x:Key="SmallScrollThumbOffset">-2</x:Double>
-    <TransformOperations x:Key="VerticalSmallScrollThumbScaleTransform">scaleX(0.125) translateX(-2px)</TransformOperations>
-    <TransformOperations x:Key="HorizontalSmallScrollThumbScaleTransform">scaleY(0.125) translateY(-2px)</TransformOperations>
-    <x:Double x:Key="ScrollBarButtonArrowIconFontSize">8</x:Double>
-
-    <!-- BaseResources for ScrollViewer.xaml -->
-    <SolidColorBrush x:Key="ScrollViewerScrollBarsSeparatorBackground" Color="{StaticResource SystemChromeMediumColor}" Opacity="0.9" />
-  </Style.Resources>
-</Style>

+ 51 - 294
src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml

@@ -28,19 +28,8 @@
     <StaticResource x:Key="ButtonBorderBrushPointerOver" ResourceKey="SystemControlForegroundTransparentBrush" />
     <StaticResource x:Key="ButtonBorderBrushPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
     <StaticResource x:Key="ButtonBorderBrushDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <SolidColorBrush x:Key="ButtonBackgroundThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ButtonBorderThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ButtonDisabledBackgroundThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ButtonDisabledBorderThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="ButtonDisabledForegroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="ButtonForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ButtonPointerOverBackgroundThemeBrush" Color="#21FFFFFF" />
-    <SolidColorBrush x:Key="ButtonPointerOverForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ButtonPressedBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ButtonPressedForegroundThemeBrush" Color="#FF000000" />
 
-    <!-- Resources for RepeatButton.xaml -->
-    <Thickness x:Key="RepeatButtonBorderThemeThickness">1</Thickness>
+    <!-- Resources for RepeatButton.xaml -->    
     <StaticResource x:Key="RepeatButtonBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
     <SolidColorBrush x:Key="RepeatButtonBackgroundPointerOver" Color="{StaticResource SystemBaseHighColor}" Opacity="0.1" />
     <StaticResource x:Key="RepeatButtonBackgroundPressed" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
@@ -53,15 +42,6 @@
     <StaticResource x:Key="RepeatButtonBorderBrushPointerOver" ResourceKey="SystemControlForegroundTransparentBrush" />
     <StaticResource x:Key="RepeatButtonBorderBrushPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
     <StaticResource x:Key="RepeatButtonBorderBrushDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <SolidColorBrush x:Key="RepeatButtonBorderThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="RepeatButtonDisabledBackgroundThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="RepeatButtonDisabledBorderThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="RepeatButtonDisabledForegroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="RepeatButtonForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="RepeatButtonPointerOverBackgroundThemeBrush" Color="#21FFFFFF" />
-    <SolidColorBrush x:Key="RepeatButtonPointerOverForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="RepeatButtonPressedBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="RepeatButtonPressedForegroundThemeBrush" Color="#FF000000" />
 
     <!-- Resources for ToggleButton.xaml -->
     <Thickness x:Key="ToggleButtonBorderThemeThickness">1</Thickness>
@@ -101,45 +81,18 @@
     <StaticResource x:Key="ToggleButtonBorderBrushIndeterminatePointerOver" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
     <StaticResource x:Key="ToggleButtonBorderBrushIndeterminatePressed" ResourceKey="SystemControlHighlightTransparentBrush" />
     <StaticResource x:Key="ToggleButtonBorderBrushIndeterminateDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <SolidColorBrush x:Key="ToggleButtonBackgroundThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ToggleButtonBorderThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedBorderThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedDisabledBackgroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedDisabledForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedPointerOverBackgroundThemeBrush" Color="#99FFFFFF" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedPointerOverBorderThemeBrush" Color="#99FFFFFF" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedPressedBackgroundThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedPressedBorderThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedPressedForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleButtonDisabledBorderThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="ToggleButtonDisabledForegroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="ToggleButtonForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleButtonPointerOverBackgroundThemeBrush" Color="#21FFFFFF" />
-    <SolidColorBrush x:Key="ToggleButtonPressedBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleButtonPressedForegroundThemeBrush" Color="#FF000000" />
 
     <!-- Resources for ComboBox.xaml -->
-    <x:Double x:Key="ComboBoxArrowThemeFontSize">21</x:Double>
     <x:Double x:Key="ComboBoxThemeMinWidth">64</x:Double>
-    <x:Double x:Key="ComboBoxPopupThemeMinWidth">80</x:Double>
-    <x:Double x:Key="ComboBoxPopupThemeTouchMinWidth">240</x:Double>
     <Thickness x:Key="ComboBoxBorderThemeThickness">1</Thickness>
     <Thickness x:Key="ComboBoxDropdownBorderThickness">1</Thickness>
-    <Thickness x:Key="ComboBoxHeaderThemeMargin">0,0,0,4</Thickness>
-    <Thickness x:Key="ComboBoxPopupBorderThemeThickness">2</Thickness>
     <Thickness x:Key="ComboBoxItemThemePadding">11,5,11,7</Thickness>
-    <Thickness x:Key="ComboBoxItemThemeTouchPadding">11,11,11,13</Thickness>
-    <Thickness x:Key="ComboBoxItemThemeGameControllerPadding">11,11,11,13</Thickness>
-    <FontWeight x:Key="ComboBoxHeaderThemeFontWeight">Normal</FontWeight>
-    <FontWeight x:Key="ComboBoxPlaceholderTextThemeFontWeight">SemiLight</FontWeight>
+    <FontWeight x:Key="ComboBoxHeaderThemeFontWeight">Normal</FontWeight>    
     <StaticResource x:Key="ComboBoxItemForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="ComboBoxItemForegroundPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="ComboBoxItemForegroundPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="ComboBoxItemForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundSelected" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundSelectedUnfocused" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
+    <StaticResource x:Key="ComboBoxItemForegroundSelected" ResourceKey="SystemControlHighlightAltBaseHighBrush" />    
     <StaticResource x:Key="ComboBoxItemForegroundSelectedPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="ComboBoxItemForegroundSelectedPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="ComboBoxItemForegroundSelectedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
@@ -147,17 +100,14 @@
     <StaticResource x:Key="ComboBoxItemBackgroundPressed" ResourceKey="SystemControlHighlightListMediumBrush" />
     <StaticResource x:Key="ComboBoxItemBackgroundPointerOver" ResourceKey="SystemControlHighlightListLowBrush" />
     <StaticResource x:Key="ComboBoxItemBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundSelected" ResourceKey="SystemControlHighlightListAccentLowBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundSelectedUnfocused" ResourceKey="SystemControlHighlightListAccentLowBrush" />
+    <StaticResource x:Key="ComboBoxItemBackgroundSelected" ResourceKey="SystemControlHighlightListAccentLowBrush" />    
     <StaticResource x:Key="ComboBoxItemBackgroundSelectedPressed" ResourceKey="SystemControlHighlightListAccentHighBrush" />
     <StaticResource x:Key="ComboBoxItemBackgroundSelectedPointerOver" ResourceKey="SystemControlHighlightListAccentMediumBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundSelectedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrush" ResourceKey="SystemControlTransparentBrush" />
+    <StaticResource x:Key="ComboBoxItemBackgroundSelectedDisabled" ResourceKey="SystemControlTransparentBrush" />    
     <StaticResource x:Key="ComboBoxItemBorderBrushPressed" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ComboBoxItemBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ComboBoxItemBorderBrushDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushSelected" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushSelectedUnfocused" ResourceKey="SystemControlTransparentBrush" />
+    <StaticResource x:Key="ComboBoxItemBorderBrushSelected" ResourceKey="SystemControlTransparentBrush" />    
     <StaticResource x:Key="ComboBoxItemBorderBrushSelectedPressed" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ComboBoxItemBorderBrushSelectedPointerOver" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ComboBoxItemBorderBrushSelectedDisabled" ResourceKey="SystemControlTransparentBrush" />
@@ -182,73 +132,18 @@
     <StaticResource x:Key="ComboBoxDropDownGlyphForeground" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
     <StaticResource x:Key="ComboBoxDropDownGlyphForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
     <StaticResource x:Key="ComboBoxDropDownGlyphForegroundFocused" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
-    <StaticResource x:Key="ComboBoxDropDownGlyphForegroundFocusedPressed" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
-    <StaticResource x:Key="ComboBoxDropDownForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
+    <StaticResource x:Key="ComboBoxDropDownGlyphForegroundFocusedPressed" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />    
     <StaticResource x:Key="ComboBoxDropDownBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
     <StaticResource x:Key="ComboBoxDropDownBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
-
-    <StaticResource x:Key="ComboBoxLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
-    <SolidColorBrush x:Key="ComboBoxArrowDisabledForegroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxArrowForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ComboBoxArrowPressedForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ComboBoxBackgroundThemeBrush" Color="#CCFFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxBorderThemeBrush" Color="#CCFFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxDisabledBackgroundThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ComboBoxDisabledBorderThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxDisabledForegroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxFocusedBackgroundThemeBrush" Color="White" />
-    <SolidColorBrush x:Key="ComboBoxFocusedBorderThemeBrush" Color="White" />
-    <SolidColorBrush x:Key="ComboBoxFocusedForegroundThemeBrush" Color="White" />
-    <SolidColorBrush x:Key="ComboBoxForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ComboBoxHeaderForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxItemDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="ComboBoxItemPointerOverBackgroundThemeBrush" Color="#21000000" />
-    <SolidColorBrush x:Key="ComboBoxItemPointerOverForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ComboBoxItemPressedBackgroundThemeBrush" Color="#FFD3D3D3" />
-    <SolidColorBrush x:Key="ComboBoxItemPressedForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ComboBoxItemSelectedBackgroundThemeBrush" Color="#FF4617B4" />
-    <SolidColorBrush x:Key="ComboBoxItemSelectedDisabledBackgroundThemeBrush" Color="#8C000000" />
-    <SolidColorBrush x:Key="ComboBoxItemSelectedDisabledForegroundThemeBrush" Color="#99FFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxItemSelectedForegroundThemeBrush" Color="White" />
-    <SolidColorBrush x:Key="ComboBoxItemSelectedPointerOverBackgroundThemeBrush" Color="#FF5F37BE" />
-    <SolidColorBrush x:Key="ComboBoxPlaceholderTextForegroundThemeBrush" Color="#88000000" />
-    <SolidColorBrush x:Key="ComboBoxPointerOverBackgroundThemeBrush" Color="#DEFFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxPointerOverBorderThemeBrush" Color="#DEFFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxPopupBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxPopupBorderThemeBrush" Color="#FF212121" />
-    <SolidColorBrush x:Key="ComboBoxPopupForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ComboBoxPressedBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxPressedBorderThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxPressedHighlightThemeBrush" Color="#FFD3D3D3" />
-    <SolidColorBrush x:Key="ComboBoxPressedForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ComboBoxSelectedBackgroundThemeBrush" Color="#FF4617B4" />
-    <SolidColorBrush x:Key="ComboBoxSelectedPointerOverBackgroundThemeBrush" Color="#FF5F37BE" />
-
     <Thickness x:Key="ComboBoxDropdownBorderPadding">0</Thickness>
     <Thickness x:Key="ComboBoxDropdownContentMargin">0,4,0,4</Thickness>
-    <StaticResource x:Key="ComboBoxDropDownBackgroundPointerOver" ResourceKey="SystemControlBackgroundListLowBrush" />
-    <StaticResource x:Key="ComboBoxDropDownBackgroundPointerPressed" ResourceKey="SystemControlBackgroundListMediumBrush" />
-    <StaticResource x:Key="ComboBoxFocusedDropDownBackgroundPointerOver" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ComboBoxFocusedDropDownBackgroundPointerPressed" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxEditableDropDownGlyphForeground" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
 
     <!-- Resources for ListBox.xaml -->
     <Thickness x:Key="ListBoxBorderThemeThickness">0</Thickness>
-    <SolidColorBrush x:Key="ListBoxBackgroundThemeBrush" Color="#CCFFFFFF" />
-    <SolidColorBrush x:Key="ListBoxBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ListBoxDisabledForegroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="ListBoxFocusBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ListBoxForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ListBoxItemDisabledForegroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="ListBoxItemPointerOverBackgroundThemeBrush" Color="#21000000" />
-    <SolidColorBrush x:Key="ListBoxItemPointerOverForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ListBoxItemPressedBackgroundThemeBrush" Color="#FFD3D3D3" />
-    <SolidColorBrush x:Key="ListBoxItemPressedForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedBackgroundThemeBrush" Color="#FF4617B4" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedDisabledBackgroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedDisabledForegroundThemeBrush" Color="#99000000" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedForegroundThemeBrush" Color="White" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedPointerOverBackgroundThemeBrush" Color="#FF5F37BE" />
+
+    <!-- Resources for ProgressBar.xaml -->
+    <x:Double x:Key="ProgressBarThemeMinHeight">4</x:Double>
+    <Thickness x:Key="ProgressBarBorderThemeThickness">0</Thickness>
 
     <!-- Resources for MenuFlyout.xaml (Menu, ContextMenu, etc) -->
     <x:Double x:Key="MenuFlyoutSeparatorThemeHeight">1</x:Double>
@@ -268,8 +163,7 @@
     <StaticResource x:Key="MenuFlyoutSubItemChevronPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="MenuFlyoutSubItemChevronPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="MenuFlyoutSubItemChevronSubMenuOpened" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="MenuFlyoutSubItemChevronDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="MenuFlyoutLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
+    <StaticResource x:Key="MenuFlyoutSubItemChevronDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />    
     <StaticResource x:Key="MenuFlyoutItemKeyboardAcceleratorTextForeground" ResourceKey="SystemControlForegroundBaseMediumBrush" />
     <StaticResource x:Key="MenuFlyoutItemKeyboardAcceleratorTextForegroundPointerOver" ResourceKey="SystemControlHighlightAltBaseMediumBrush" />
     <StaticResource x:Key="MenuFlyoutItemKeyboardAcceleratorTextForegroundPressed" ResourceKey="SystemControlHighlightAltBaseMediumBrush" />
@@ -279,50 +173,43 @@
     <StaticResource x:Key="MenuFlyoutPresenterBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
     <StaticResource x:Key="MenuFlyoutPresenterBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
     <Thickness x:Key="MenuFlyoutPresenterBorderThemeThickness">1</Thickness>
-
-    <!-- Resources for ProgressBar.xaml -->
-    <x:Double x:Key="ProgressBarIndicatorPauseOpacity">0.6</x:Double>
-    <x:Double x:Key="ProgressBarThemeMinHeight">4</x:Double>
-    <Thickness x:Key="ProgressBarBorderThemeThickness">0</Thickness>
-    <SolidColorBrush x:Key="ProgressBarBackgroundThemeBrush" Color="#59FFFFFF" />
-    <SolidColorBrush x:Key="ProgressBarBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ProgressBarForegroundThemeBrush" Color="#FF5B2EC5" />
-    <SolidColorBrush x:Key="ProgressBarIndeterminateForegroundThemeBrush" Color="#FF8A57FF" />
-
+   
     <!-- Resources for TextBox.xaml -->
-    <SolidColorBrush x:Key="TextBoxForegroundHeaderThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="TextBoxPlaceholderTextThemeBrush" Color="#AB000000" />
-    <SolidColorBrush x:Key="TextBoxBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="TextBoxBorderThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="TextBoxButtonBackgroundThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="TextBoxButtonBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="TextBoxButtonForegroundThemeBrush" Color="#99FFFFFF" />
-    <SolidColorBrush x:Key="TextBoxButtonPointerOverBackgroundThemeBrush" Color="#FFDEDEDE" />
-    <SolidColorBrush x:Key="TextBoxButtonPointerOverBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="TextBoxButtonPointerOverForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="TextBoxButtonPressedBackgroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="TextBoxButtonPressedBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="TextBoxButtonPressedForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="TextBoxDisabledBackgroundThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="TextBoxDisabledBorderThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="TextBoxDisabledForegroundThemeBrush" Color="#FF666666" />
-    <SolidColorBrush x:Key="TextBoxForegroundThemeBrush" Color="#FF000000" />
+    <!-- Copied from FluentBaseDark.xaml -->
+    <StaticResource x:Key="TextControlForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
+    <StaticResource x:Key="TextControlForegroundPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
+    <StaticResource x:Key="TextControlForegroundDisabled" ResourceKey="SystemControlDisabledChromeDisabledLowBrush" />
+    <StaticResource x:Key="TextControlBackground" ResourceKey="SystemControlBackgroundAltMediumLowBrush" />
+    <StaticResource x:Key="TextControlBackgroundPointerOver" ResourceKey="SystemControlBackgroundAltMediumBrush" />
+    <StaticResource x:Key="TextControlBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
+    <StaticResource x:Key="TextControlBorderBrushFocused" ResourceKey="SystemControlHighlightAccentBrush" />
+    <StaticResource x:Key="TextControlBorderBrushDisabled" ResourceKey="SystemControlDisabledBaseLowBrush" />
+    <StaticResource x:Key="TextControlPlaceholderForeground" ResourceKey="SystemControlPageTextBaseMediumBrush" />
+    <StaticResource x:Key="TextControlPlaceholderForegroundPointerOver" ResourceKey="SystemControlPageTextBaseMediumBrush" />
+    <StaticResource x:Key="TextControlPlaceholderForegroundDisabled" ResourceKey="SystemControlDisabledChromeDisabledLowBrush" />
+    <StaticResource x:Key="TextControlSelectionHighlightColor" ResourceKey="SystemControlHighlightAccentBrush" />
+    <StaticResource x:Key="TextControlButtonBackground" ResourceKey="SystemControlTransparentBrush" />
+    <StaticResource x:Key="TextControlButtonBackgroundPointerOver" ResourceKey="SystemControlTransparentBrush" />
+    <StaticResource x:Key="TextControlButtonBackgroundPressed" ResourceKey="SystemControlHighlightAccentBrush" />
+    <StaticResource x:Key="TextControlButtonBorderBrush" ResourceKey="SystemControlTransparentBrush" />
+    <StaticResource x:Key="TextControlButtonBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
+    <StaticResource x:Key="TextControlButtonBorderBrushPressed" ResourceKey="SystemControlTransparentBrush" />
+    <StaticResource x:Key="TextControlButtonForegroundPointerOver" ResourceKey="SystemControlHighlightAccentBrush" />
+    <StaticResource x:Key="TextControlButtonForegroundPressed" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />    
     <StaticResource x:Key="TextControlBackgroundFocused" ResourceKey="SystemControlBackgroundAltHighBrush" />
     <StaticResource x:Key="TextControlBorderBrush" ResourceKey="SystemControlForegroundBaseMediumBrush" />
     <StaticResource x:Key="TextControlBorderBrushPointerOver" ResourceKey="SystemControlHighlightBaseMediumHighBrush" />
     <StaticResource x:Key="TextControlButtonForeground" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
     <StaticResource x:Key="TextControlForegroundFocused" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="TextControlPlaceholderForegroundFocused" ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
+        
 
     <!-- Resources for AutoCompleteBox.xaml -->
     <StaticResource x:Key="AutoCompleteBoxSuggestionsListBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
     <StaticResource x:Key="AutoCompleteBoxSuggestionsListBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
-    <StaticResource x:Key="AutoCompleteBoxLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
-    <x:Double x:Key="AutoCompleteBoxIconFontSize">12</x:Double>
-
+    
     <!-- Resources for Checkbox.xaml -->
     <Thickness x:Key="CheckBoxBorderThemeThickness">1</Thickness>
-    <Thickness x:Key="CheckBoxCheckedStrokeThickness">0</Thickness>
     <StaticResource x:Key="CheckBoxForegroundUnchecked" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="CheckBoxForegroundUncheckedPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="CheckBoxForegroundUncheckedPressed" ResourceKey="SystemControlForegroundBaseHighBrush" />
@@ -362,8 +249,7 @@
     <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUnchecked" ResourceKey="SystemControlForegroundBaseMediumBrush" />
     <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUncheckedPointerOver" ResourceKey="SystemControlHighlightBaseMediumHighBrush" />
     <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUncheckedPressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUncheckedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeChecked" ResourceKey="SystemControlHighlightTransparentBrush" />
+    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUncheckedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />    
     <StaticResource x:Key="CheckBoxCheckBackgroundStrokeCheckedPointerOver" ResourceKey="SystemAccentColorDark1" />
     <StaticResource x:Key="CheckBoxCheckBackgroundStrokeCheckedPressed" ResourceKey="SystemAccentColorLight1" />
     <StaticResource x:Key="CheckBoxCheckBackgroundStrokeCheckedDisabled" ResourceKey="SystemControlTransparentBrush" />
@@ -395,23 +281,9 @@
     <StaticResource x:Key="CheckBoxCheckGlyphForegroundIndeterminatePointerOver" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
     <StaticResource x:Key="CheckBoxCheckGlyphForegroundIndeterminatePressed" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
     <StaticResource x:Key="CheckBoxCheckGlyphForegroundIndeterminateDisabled" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
-    <SolidColorBrush x:Key="CheckBoxBackgroundThemeBrush" Color="#CCFFFFFF" />
-    <SolidColorBrush x:Key="CheckBoxBorderThemeBrush" Color="#CCFFFFFF" />
-    <SolidColorBrush x:Key="CheckBoxContentDisabledForegroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="CheckBoxContentForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="CheckBoxDisabledBackgroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="CheckBoxDisabledBorderThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="CheckBoxDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="CheckBoxForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="CheckBoxPointerOverBackgroundThemeBrush" Color="#DEFFFFFF" />
-    <SolidColorBrush x:Key="CheckBoxPointerOverBorderThemeBrush" Color="#DEFFFFFF" />
-    <SolidColorBrush x:Key="CheckBoxPointerOverForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="CheckBoxPressedBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="CheckBoxPressedBorderThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="CheckBoxPressedForegroundThemeBrush" Color="#FF000000" />
+    
 
     <!-- Resources for Calendar.xaml, CalendarButton.xaml, CalendarDayButton.xaml, CalendarItem.xaml -->
-    <StaticResource x:Key="CalendarViewFocusBorderBrush" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="CalendarViewSelectedHoverBorderBrush" ResourceKey="SystemControlHighlightListAccentMediumBrush" />
     <StaticResource x:Key="CalendarViewSelectedPressedBorderBrush" ResourceKey="SystemControlHighlightListAccentHighBrush" />
     <StaticResource x:Key="CalendarViewSelectedBorderBrush" ResourceKey="SystemControlHighlightAccentBrush" />
@@ -419,12 +291,9 @@
     <StaticResource x:Key="CalendarViewPressedBorderBrush" ResourceKey="SystemControlHighlightBaseMediumBrush" />
     <StaticResource x:Key="CalendarViewTodayForeground" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
     <StaticResource x:Key="CalendarViewBlackoutForeground" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CalendarViewSelectedForeground" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="CalendarViewPressedForeground" ResourceKey="SystemControlHighlightBaseHighBrush" />
     <StaticResource x:Key="CalendarViewOutOfScopeForeground" ResourceKey="SystemControlHyperlinkBaseHighBrush" />
     <StaticResource x:Key="CalendarViewCalendarItemForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="CalendarViewOutOfScopeBackground" ResourceKey="SystemControlDisabledChromeMediumLowBrush" />
-    <StaticResource x:Key="CalendarViewCalendarItemBackground" ResourceKey="SystemControlBackgroundAltHighBrush" />
     <StaticResource x:Key="CalendarViewForeground" ResourceKey="SystemControlHyperlinkBaseMediumHighBrush" />
     <StaticResource x:Key="CalendarViewBackground" ResourceKey="SystemControlBackgroundAltHighBrush" />
     <StaticResource x:Key="CalendarViewBorderBrush" ResourceKey="SystemControlForegroundChromeMediumBrush" />
@@ -432,12 +301,11 @@
     <StaticResource x:Key="CalendarViewNavigationButtonBackground" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="CalendarViewNavigationButtonForegroundPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="CalendarViewNavigationButtonForegroundPressed" ResourceKey="SystemControlForegroundBaseMediumBrush" />
-    <StaticResource x:Key="CalendarViewNavigationButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
     <StaticResource x:Key="CalendarViewCalendarItemRevealBackground" ResourceKey="SystemControlTransparentRevealBackgroundBrush" />
     <StaticResource x:Key="CalendarViewCalendarItemRevealBorderBrush" ResourceKey="SystemControlTransparentRevealBorderBrush" />
     <StaticResource x:Key="CalendarViewNavigationButtonBorderBrushPointerOver" ResourceKey="SystemControlHighlightTransparentBrush" />
     <StaticResource x:Key="CalendarViewNavigationButtonBorderBrush" ResourceKey="SystemControlTransparentBrush" />
-    
+   
     <!--Resources for NotificationCard.xaml -->
     <SolidColorBrush x:Key="NotificationCardBackgroundBrush" Color="#444444" />
     <SolidColorBrush x:Key="NotificationCardProgressBackgroundBrush" Color="#9A9A9A" />
@@ -484,27 +352,11 @@
     <StaticResource x:Key="RadioButtonCheckGlyphStrokePointerOver" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="RadioButtonCheckGlyphStrokePressed" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="RadioButtonCheckGlyphStrokeDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <SolidColorBrush x:Key="RadioButtonBackgroundThemeBrush" Color="#CCFFFFFF" />
-    <SolidColorBrush x:Key="RadioButtonBorderThemeBrush" Color="#CCFFFFFF" />
-    <SolidColorBrush x:Key="RadioButtonContentDisabledForegroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="RadioButtonContentForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="RadioButtonDisabledBackgroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="RadioButtonDisabledBorderThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="RadioButtonDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="RadioButtonForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="RadioButtonPointerOverBackgroundThemeBrush" Color="#DEFFFFFF" />
-    <SolidColorBrush x:Key="RadioButtonPointerOverBorderThemeBrush" Color="#DEFFFFFF" />
-    <SolidColorBrush x:Key="RadioButtonPointerOverForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="RadioButtonPressedBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="RadioButtonPressedBorderThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="RadioButtonPressedForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="RadioButtonContentPointerOverForegroundThemeBrush" Color="{DynamicResource SystemColorHighlightTextColor}" />
-
+    
     <!-- Resources for Slider.xaml -->
     <x:Double x:Key="SliderOutsideTickBarThemeHeight">4</x:Double>
     <x:Double x:Key="SliderTrackThemeHeight">2</x:Double>
     <Thickness x:Key="SliderBorderThemeThickness">0</Thickness>
-    <Thickness x:Key="SliderHeaderThemeMargin">0,0,0,4</Thickness>
     <FontWeight x:Key="SliderHeaderThemeFontWeight">Normal</FontWeight>
     <StaticResource x:Key="SliderContainerBackground" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="SliderContainerBackgroundPointerOver" ResourceKey="SystemControlTransparentBrush" />
@@ -527,44 +379,18 @@
     <StaticResource x:Key="SliderTickBarFill" ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
     <StaticResource x:Key="SliderTickBarFillDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
     <StaticResource x:Key="SliderInlineTickBarFill" ResourceKey="SystemControlBackgroundAltHighBrush" />
-    <SolidColorBrush x:Key="SliderBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="SliderDisabledBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="SliderThumbBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="SliderThumbBorderThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="SliderThumbDisabledBackgroundThemeBrush" Color="#FF7E7E7E" />
-    <SolidColorBrush x:Key="SliderThumbPointerOverBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="SliderThumbPointerOverBorderThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="SliderThumbPressedBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="SliderThumbPressedBorderThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="SliderTickMarkInlineBackgroundThemeBrush" Color="Black" />
-    <SolidColorBrush x:Key="SliderTickMarkInlineDisabledForegroundThemeBrush" Color="Black" />
-    <SolidColorBrush x:Key="SliderTickmarkOutsideBackgroundThemeBrush" Color="#80FFFFFF" />
-    <SolidColorBrush x:Key="SliderTickMarkOutsideDisabledForegroundThemeBrush" Color="#80FFFFFF" />
-    <SolidColorBrush x:Key="SliderTrackBackgroundThemeBrush" Color="#29FFFFFF" />
-    <SolidColorBrush x:Key="SliderTrackDecreaseBackgroundThemeBrush" Color="#FF5B2EC5" />
-    <SolidColorBrush x:Key="SliderTrackDecreaseDisabledBackgroundThemeBrush" Color="#1FFFFFFF" />
-    <SolidColorBrush x:Key="SliderTrackDecreasePointerOverBackgroundThemeBrush" Color="#FF724BCD" />
-    <SolidColorBrush x:Key="SliderTrackDecreasePressedBackgroundThemeBrush" Color="#FF8152EF" />
-    <SolidColorBrush x:Key="SliderTrackDisabledBackgroundThemeBrush" Color="#29FFFFFF" />
-    <SolidColorBrush x:Key="SliderTrackPointerOverBackgroundThemeBrush" Color="#46FFFFFF" />
-    <SolidColorBrush x:Key="SliderTrackPressedBackgroundThemeBrush" Color="#59FFFFFF" />
-    <SolidColorBrush x:Key="SliderHeaderForegroundThemeBrush" Color="#FFFFFFFF" />
-
+    
     <!--ToggleSwitch-->
     <Thickness x:Key="ToggleSwitchOnStrokeThickness">0</Thickness>
     <Thickness x:Key="ToggleSwitchOuterBorderStrokeThickness">1</Thickness>
     <StaticResource x:Key="ToggleSwitchContentForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ToggleSwitchContentForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleSwitchHeaderForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="ToggleSwitchHeaderForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
     <StaticResource x:Key="ToggleSwitchContainerBackground" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ToggleSwitchContainerBackgroundPointerOver" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ToggleSwitchContainerBackgroundPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ToggleSwitchContainerBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ToggleSwitchFillOff" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ToggleSwitchFillOffPointerOver" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ToggleSwitchFillOffPressed" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleSwitchFillOffDisabled" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ToggleSwitchStrokeOff" ResourceKey="SystemControlForegroundBaseMediumBrush" />
     <StaticResource x:Key="ToggleSwitchStrokeOffPointerOver" ResourceKey="SystemControlHighlightBaseMediumHighBrush" />
     <StaticResource x:Key="ToggleSwitchStrokeOffPressed" ResourceKey="SystemControlForegroundBaseHighBrush" />
@@ -585,29 +411,6 @@
     <StaticResource x:Key="ToggleSwitchKnobFillOnPointerOver" ResourceKey="SystemControlHighlightChromeWhiteBrush" />
     <StaticResource x:Key="ToggleSwitchKnobFillOnPressed" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
     <StaticResource x:Key="ToggleSwitchKnobFillOnDisabled" ResourceKey="SystemControlPageBackgroundBaseLowBrush" />
-    <SolidColorBrush x:Key="ToggleSwitchCurtainBackgroundThemeBrush" Color="#FF5729C1" />
-    <SolidColorBrush x:Key="ToggleSwitchCurtainDisabledBackgroundThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ToggleSwitchCurtainPointerOverBackgroundThemeBrush" Color="#FF6E46CA" />
-    <SolidColorBrush x:Key="ToggleSwitchCurtainPressedBackgroundThemeBrush" Color="#FF7E4FEC" />
-    <SolidColorBrush x:Key="ToggleSwitchDisabledForegroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="ToggleSwitchForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleSwitchHeaderDisabledForegroundThemeBrush" Color="#66FFFFFF" />
-    <SolidColorBrush x:Key="ToggleSwitchHeaderForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleSwitchOuterBorderBorderThemeBrush" Color="#59FFFFFF" />
-    <SolidColorBrush x:Key="ToggleSwitchOuterBorderDisabledBorderThemeBrush" Color="#33FFFFFF" />
-    <SolidColorBrush x:Key="ToggleSwitchThumbBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleSwitchThumbBorderThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleSwitchThumbDisabledBackgroundThemeBrush" Color="#FF7E7E7E" />
-    <SolidColorBrush x:Key="ToggleSwitchThumbDisabledBorderThemeBrush" Color="#FF7E7E7E" />
-    <SolidColorBrush x:Key="ToggleSwitchThumbPointerOverBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleSwitchThumbPointerOverBorderThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleSwitchThumbPressedBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleSwitchThumbPressedForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleSwitchTrackBackgroundThemeBrush" Color="#42FFFFFF" />
-    <SolidColorBrush x:Key="ToggleSwitchTrackBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ToggleSwitchTrackDisabledBackgroundThemeBrush" Color="#1FFFFFFF" />
-    <SolidColorBrush x:Key="ToggleSwitchTrackPointerOverBackgroundThemeBrush" Color="#4AFFFFFF" />
-    <SolidColorBrush x:Key="ToggleSwitchTrackPressedBackgroundThemeBrush" Color="#59FFFFFF" />
 
     <!-- Resources for ToolTip.xaml -->
     <x:Double x:Key="ToolTipContentThemeFontSize">12</x:Double>
@@ -615,16 +418,12 @@
     <StaticResource x:Key="ToolTipForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="ToolTipBackground" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
     <StaticResource x:Key="ToolTipBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
-    <SolidColorBrush x:Key="ToolTipBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToolTipBorderThemeBrush" Color="#FF808080" />
-    <SolidColorBrush x:Key="ToolTipForegroundThemeBrush" Color="#FF666666" />
-    <Thickness x:Key="ToolTipBorderThemePadding">8,5,8,7</Thickness>
+    <Thickness x:Key="ToolTipBorderThemePadding">8,5,8,7</Thickness>    
 
     <!-- Resources for DatePicker.xaml-->
     <StaticResource x:Key="DatePickerSpacerFill" ResourceKey="SystemControlForegroundBaseLowBrush" />
     <StaticResource x:Key="DatePickerSpacerFillDisabled" ResourceKey="SystemControlDisabledBaseLowBrush" />
     <StaticResource x:Key="DatePickerHeaderForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="DatePickerHeaderForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
     <StaticResource x:Key="DatePickerButtonBorderBrush" ResourceKey="SystemControlForegroundBaseMediumBrush" />
     <StaticResource x:Key="DatePickerButtonBorderBrushPointerOver" ResourceKey="SystemControlHighlightBaseMediumHighBrush" />
     <StaticResource x:Key="DatePickerButtonBorderBrushPressed" ResourceKey="SystemControlHighlightBaseMediumBrush" />
@@ -633,17 +432,14 @@
     <StaticResource x:Key="DatePickerButtonBackgroundPointerOver" ResourceKey="SystemControlPageBackgroundAltMediumBrush" />
     <StaticResource x:Key="DatePickerButtonBackgroundPressed" ResourceKey="SystemControlBackgroundBaseLowBrush" />
     <StaticResource x:Key="DatePickerButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="DatePickerButtonBackgroundFocused" ResourceKey="SystemControlHighlightListAccentLowBrush" />
     <StaticResource x:Key="DatePickerButtonForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="DatePickerButtonForegroundPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
     <StaticResource x:Key="DatePickerButtonForegroundPressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
     <StaticResource x:Key="DatePickerButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="DatePickerButtonForegroundFocused" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="DatePickerFlyoutPresenterBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
     <StaticResource x:Key="DatePickerFlyoutPresenterBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
     <StaticResource x:Key="DatePickerFlyoutPresenterSpacerFill" ResourceKey="SystemControlForegroundBaseLowBrush" />
     <StaticResource x:Key="DatePickerFlyoutPresenterHighlightFill" ResourceKey="SystemControlHighlightListAccentLowBrush" />
-    <StaticResource x:Key="DatePickerLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
 
     <StaticResource x:Key="DateTimePickerFlyoutButtonBackground" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="DateTimePickerFlyoutButtonBackgroundPointerOver" ResourceKey="SystemControlHighlightListLowBrush" />
@@ -653,6 +449,7 @@
     <StaticResource x:Key="DateTimePickerFlyoutButtonBorderBrushPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
     <StaticResource x:Key="DateTimePickerFlyoutButtonForegroundPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="DateTimePickerFlyoutButtonForegroundPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
+    
 
     <!-- Resources for TimePicker.xaml -->
     <StaticResource x:Key="TimePickerSpacerFill" ResourceKey="SystemControlForegroundBaseLowBrush" />
@@ -667,30 +464,22 @@
     <StaticResource x:Key="TimePickerButtonBackgroundPointerOver" ResourceKey="SystemControlPageBackgroundAltMediumBrush" />
     <StaticResource x:Key="TimePickerButtonBackgroundPressed" ResourceKey="SystemControlBackgroundBaseLowBrush" />
     <StaticResource x:Key="TimePickerButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="TimePickerButtonBackgroundFocused" ResourceKey="SystemControlHighlightListAccentLowBrush" />
     <StaticResource x:Key="TimePickerButtonForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="TimePickerButtonForegroundPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
     <StaticResource x:Key="TimePickerButtonForegroundPressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
     <StaticResource x:Key="TimePickerButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="TimePickerButtonForegroundFocused" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="TimePickerFlyoutPresenterBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
     <StaticResource x:Key="TimePickerFlyoutPresenterBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
     <StaticResource x:Key="TimePickerFlyoutPresenterSpacerFill" ResourceKey="SystemControlForegroundBaseLowBrush" />
     <StaticResource x:Key="TimePickerFlyoutPresenterHighlightFill" ResourceKey="SystemControlHighlightListAccentLowBrush" />
-    <StaticResource x:Key="TimePickerLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
-    <SolidColorBrush x:Key="TimePickerHeaderForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="TimePickerForegroundThemeBrush" Color="#FF000000" />
 
     <!-- Resources for TabItem.xaml -->
-    <FontFamily x:Key="TabItemHeaderFontFamily">XamlAutoFontFamily</FontFamily>
     <x:Double x:Key="TabItemHeaderFontSize">24</x:Double>
-    <x:Double x:Key="TabItemHeaderLockedTranslation">40</x:Double>
-    <x:Int32 x:Key="TabItemHeaderCharacterSpacing">-25</x:Int32>
     <Thickness x:Key="TabItemHeaderMargin">12,0,12,0</Thickness>
     <Thickness x:Key="TabItemMargin">12,0,12,0</Thickness>
     <FontWeight x:Key="TabItemHeaderThemeFontWeight">SemiLight</FontWeight>
     <StaticResource x:Key="TabControlBackground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderBackground" ResourceKey="SystemControlTransparentBrush" />
+          
     <!-- Resources for TabItem -->
     <StaticResource x:Key="TabItemHeaderBackgroundUnselected" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="TabItemHeaderBackgroundUnselectedPointerOver" ResourceKey="SystemControlHighlightTransparentBrush" />
@@ -705,24 +494,19 @@
     <StaticResource x:Key="TabItemHeaderForegroundSelected" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="TabItemHeaderForegroundSelectedPointerOver" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
     <StaticResource x:Key="TabItemHeaderForegroundSelectedPressed" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
-    <StaticResource x:Key="TabItemHeaderForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="TabItemHeaderFocusPipeFill" ResourceKey="SystemControlHighlightAltAccentBrush" />
+    <StaticResource x:Key="TabItemHeaderForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />    
     <StaticResource x:Key="TabItemHeaderSelectedPipeFill" ResourceKey="SystemControlHighlightAltAccentBrush" />
+    
 
     <!-- Resources for ScrollBar.xaml -->
     <x:Double x:Key="ScrollBarTrackBorderThemeThickness">0</x:Double>
-    <Thickness x:Key="ScrollBarPanningBorderThemeThickness">1</Thickness>
     <StaticResource x:Key="ScrollBarBackground" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ScrollBarBackgroundPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ScrollBarForeground" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ScrollBarBorderBrush" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarBorderBrushDisabled" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ScrollBarButtonBackground" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ScrollBarButtonBackgroundPointerOver" ResourceKey="SystemControlBackgroundListLowBrush" />
     <StaticResource x:Key="ScrollBarButtonBackgroundPressed" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
-    <StaticResource x:Key="ScrollBarButtonBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ScrollBarButtonBorderBrush" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ScrollBarButtonBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ScrollBarButtonBorderBrushPressed" ResourceKey="SystemControlTransparentBrush" />
@@ -731,46 +515,19 @@
     <StaticResource x:Key="ScrollBarButtonArrowForegroundPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="ScrollBarButtonArrowForegroundPressed" ResourceKey="SystemControlForegroundAltHighBrush" />
     <StaticResource x:Key="ScrollBarButtonArrowForegroundDisabled" ResourceKey="SystemControlForegroundBaseLowBrush" />
-    <StaticResource x:Key="ScrollBarThumbFill" ResourceKey="SystemControlForegroundChromeDisabledLowBrush" />
     <StaticResource x:Key="ScrollBarThumbFillPointerOver" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
     <StaticResource x:Key="ScrollBarThumbFillPressed" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
     <StaticResource x:Key="ScrollBarThumbFillDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
     <SolidColorBrush x:Key="ScrollBarTrackFill" Color="{StaticResource SystemChromeMediumColor}" Opacity="0.9" />
     <SolidColorBrush x:Key="ScrollBarTrackFillPointerOver" Color="{StaticResource SystemChromeMediumColor}" Opacity="0.9" />
-    <StaticResource x:Key="ScrollBarTrackFillDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
     <StaticResource x:Key="ScrollBarTrackStroke" ResourceKey="SystemControlForegroundTransparentBrush" />
     <StaticResource x:Key="ScrollBarTrackStrokePointerOver" ResourceKey="SystemControlForegroundTransparentBrush" />
-    <StaticResource x:Key="ScrollBarTrackStrokeDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
     <StaticResource x:Key="ScrollBarThumbBackgroundColor" ResourceKey="SystemBaseLowColor" />
     <StaticResource x:Key="ScrollBarPanningThumbBackgroundColor" ResourceKey="SystemChromeDisabledLowColor" />
-    <SolidColorBrush x:Key="ScrollBarThumbBackground" Color="{StaticResource ScrollBarThumbBackgroundColor}" />
     <SolidColorBrush x:Key="ScrollBarPanningThumbBackground" Color="{StaticResource ScrollBarPanningThumbBackgroundColor}" />
-    <StaticResource x:Key="ScrollBarPanningThumbBackgroundDisabled" ResourceKey="SystemControlDisabledChromeHighBrush" />
-    <SolidColorBrush x:Key="ScrollBarButtonForegroundThemeBrush" Color="#99000000" />
-    <SolidColorBrush x:Key="ScrollBarButtonPointerOverBackgroundThemeBrush" Color="#FFDADADA" />
-    <SolidColorBrush x:Key="ScrollBarButtonPointerOverBorderThemeBrush" Color="#FFDADADA" />
-    <SolidColorBrush x:Key="ScrollBarButtonPointerOverForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ScrollBarButtonPressedBackgroundThemeBrush" Color="#99000000" />
-    <SolidColorBrush x:Key="ScrollBarButtonPressedBorderThemeBrush" Color="#99000000" />
-    <SolidColorBrush x:Key="ScrollBarButtonPressedForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ScrollBarPanningBackgroundThemeBrush" Color="#FFCDCDCD" />
-    <SolidColorBrush x:Key="ScrollBarPanningBorderThemeBrush" Color="#7D9A9A9A" />
-    <SolidColorBrush x:Key="ScrollBarThumbBackgroundThemeBrush" Color="#FFCDCDCD" />
-    <SolidColorBrush x:Key="ScrollBarThumbBorderThemeBrush" Color="#3B555555" />
-    <SolidColorBrush x:Key="ScrollBarThumbPointerOverBackgroundThemeBrush" Color="#FFDADADA" />
-    <SolidColorBrush x:Key="ScrollBarThumbPointerOverBorderThemeBrush" Color="#6BB7B7B7" />
-    <SolidColorBrush x:Key="ScrollBarThumbPressedBackgroundThemeBrush" Color="#99000000" />
-    <SolidColorBrush x:Key="ScrollBarThumbPressedBorderThemeBrush" Color="#ED555555" />
-    <SolidColorBrush x:Key="ScrollBarTrackBackgroundThemeBrush" Color="#59D5D5D5" />
-    <SolidColorBrush x:Key="ScrollBarTrackBorderThemeBrush" Color="#59D5D5D5" />
-    <x:String x:Key="ScrollBarExpandDuration">00:00:00.1</x:String>
-    <x:String x:Key="ScrollBarContractDelay">00:00:02</x:String>
-    <x:String x:Key="ScrollBarContractDuration">00:00:00.1</x:String>
-    <x:String x:Key="ScrollBarContractFinalKeyframe">00:00:02.1</x:String>
     <x:Double x:Key="ScrollBarSize">16</x:Double>
     <x:Double x:Key="ScrollBarButtonArrowIconFontSize">8</x:Double>
-    <x:String x:Key="ScrollBarExpandBeginTime">00:00:00.40</x:String>
-    <x:String x:Key="ScrollBarContractBeginTime">00:00:02.00</x:String>
+      
     <!-- Resources for TreeViewItem.xaml -->
     <StaticResource x:Key="TreeViewItemBackground" ResourceKey="SystemControlTransparentRevealBackgroundBrush" />
     <StaticResource x:Key="TreeViewItemBackgroundPointerOver" ResourceKey="SystemControlHighlightListLowRevealBackgroundBrush" />
@@ -796,11 +553,9 @@
     <StaticResource x:Key="TreeViewItemBorderBrushSelectedPointerOver" ResourceKey="SystemControlBackgroundTransparentRevealBorderBrush" />
     <StaticResource x:Key="TreeViewItemBorderBrushSelectedPressed" ResourceKey="SystemControlBackgroundTransparentRevealBorderBrush" />
     <StaticResource x:Key="TreeViewItemBorderBrushSelectedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TreeViewItemCheckBoxBackgroundSelected" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TreeViewItemCheckBoxBorderSelected" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
-    <StaticResource x:Key="TreeViewItemCheckGlyphSelected" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
     <Thickness x:Key="TreeViewItemBorderThemeThickness">1</Thickness>
     <x:Double x:Key="TreeViewItemMinHeight">32</x:Double>
+
     <!-- Resources for SplitView.xaml -->
     <StaticResource x:Key="SplitViewLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
   
@@ -812,7 +567,9 @@
 
     <!-- Resources for FlyoutPresenter.xaml -->
     <StaticResource x:Key="FlyoutPresenterBackground" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
-    <StaticResource x:Key="FlyoutBorderThemeBrush" ResourceKey="SystemControlForegroundChromeHighBrush" />
+    <StaticResource x:Key="FlyoutBorderThemeBrush" ResourceKey="SystemControlTransientBorderBrush" />
 
+    <!-- BaseResources for ScrollViewer.xaml -->
+    <SolidColorBrush x:Key="ScrollViewerScrollBarsSeparatorBackground" Color="{StaticResource SystemChromeMediumColor}" Opacity="0.9" />    
   </Style.Resources>
 </Style>

+ 50 - 297
src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml

@@ -28,19 +28,8 @@
     <StaticResource x:Key="ButtonBorderBrushPointerOver" ResourceKey="SystemControlForegroundTransparentBrush" />
     <StaticResource x:Key="ButtonBorderBrushPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
     <StaticResource x:Key="ButtonBorderBrushDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <SolidColorBrush x:Key="ButtonBackgroundThemeBrush" Color="#B3B6B6B6" />
-    <SolidColorBrush x:Key="ButtonBorderThemeBrush" Color="#33000000" />
-    <SolidColorBrush x:Key="ButtonDisabledBackgroundThemeBrush" Color="#66CACACA" />
-    <SolidColorBrush x:Key="ButtonDisabledBorderThemeBrush" Color="#1A000000" />
-    <SolidColorBrush x:Key="ButtonDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="ButtonForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ButtonPointerOverBackgroundThemeBrush" Color="#D1CDCDCD" />
-    <SolidColorBrush x:Key="ButtonPointerOverForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ButtonPressedBackgroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ButtonPressedForegroundThemeBrush" Color="#FFFFFFFF" />
-
+    
     <!-- Resources for RepeatButton.xaml -->
-    <Thickness x:Key="RepeatButtonBorderThemeThickness">1</Thickness>
     <StaticResource x:Key="RepeatButtonBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
     <SolidColorBrush x:Key="RepeatButtonBackgroundPointerOver" Color="{StaticResource SystemBaseHighColor}" Opacity="0.1" />
     <StaticResource x:Key="RepeatButtonBackgroundPressed" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
@@ -53,15 +42,7 @@
     <StaticResource x:Key="RepeatButtonBorderBrushPointerOver" ResourceKey="SystemControlForegroundTransparentBrush" />
     <StaticResource x:Key="RepeatButtonBorderBrushPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
     <StaticResource x:Key="RepeatButtonBorderBrushDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <SolidColorBrush x:Key="RepeatButtonBorderThemeBrush" Color="#33000000" />
-    <SolidColorBrush x:Key="RepeatButtonDisabledBackgroundThemeBrush" Color="#66CACACA" />
-    <SolidColorBrush x:Key="RepeatButtonDisabledBorderThemeBrush" Color="#1A000000" />
-    <SolidColorBrush x:Key="RepeatButtonDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="RepeatButtonForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="RepeatButtonPointerOverBackgroundThemeBrush" Color="#D1CDCDCD" />
-    <SolidColorBrush x:Key="RepeatButtonPointerOverForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="RepeatButtonPressedBackgroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="RepeatButtonPressedForegroundThemeBrush" Color="#FFFFFFFF" />
+        
     <!-- Resources for ToggleButton.xaml -->
     <Thickness x:Key="ToggleButtonBorderThemeThickness">1</Thickness>
     <StaticResource x:Key="ToggleButtonBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
@@ -100,45 +81,18 @@
     <StaticResource x:Key="ToggleButtonBorderBrushIndeterminatePointerOver" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
     <StaticResource x:Key="ToggleButtonBorderBrushIndeterminatePressed" ResourceKey="SystemControlHighlightTransparentBrush" />
     <StaticResource x:Key="ToggleButtonBorderBrushIndeterminateDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <SolidColorBrush x:Key="ToggleButtonBackgroundThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ToggleButtonBorderThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedBackgroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedBorderThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedDisabledBackgroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedDisabledForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedPointerOverBackgroundThemeBrush" Color="#99000000" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedPointerOverBorderThemeBrush" Color="#99000000" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedPressedBackgroundThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedPressedBorderThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleButtonCheckedPressedForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleButtonDisabledBorderThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="ToggleButtonDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="ToggleButtonForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleButtonPointerOverBackgroundThemeBrush" Color="#21000000" />
-    <SolidColorBrush x:Key="ToggleButtonPressedBackgroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleButtonPressedForegroundThemeBrush" Color="#FFFFFFFF" />
-
+   
     <!-- Resources for ComboBox.xaml -->
-    <x:Double x:Key="ComboBoxArrowThemeFontSize">21</x:Double>
-    <x:Double x:Key="ComboBoxThemeMinWidth">64</x:Double>
-    <x:Double x:Key="ComboBoxPopupThemeMinWidth">80</x:Double>
-    <x:Double x:Key="ComboBoxPopupThemeTouchMinWidth">240</x:Double>
+    <x:Double x:Key="ComboBoxThemeMinWidth">64</x:Double>    
     <Thickness x:Key="ComboBoxBorderThemeThickness">1</Thickness>
-    <Thickness x:Key="ComboBoxDropdownBorderThickness">1</Thickness>
-    <Thickness x:Key="ComboBoxHeaderThemeMargin">0,0,0,4</Thickness>
-    <Thickness x:Key="ComboBoxPopupBorderThemeThickness">2</Thickness>
-    <Thickness x:Key="ComboBoxItemThemePadding">11,5,11,7</Thickness>
-    <Thickness x:Key="ComboBoxItemThemeTouchPadding">11,11,11,13</Thickness>
-    <Thickness x:Key="ComboBoxItemThemeGameControllerPadding">11,11,11,13</Thickness>
+    <Thickness x:Key="ComboBoxDropdownBorderThickness">1</Thickness>    
+    <Thickness x:Key="ComboBoxItemThemePadding">11,5,11,7</Thickness>    
     <FontWeight x:Key="ComboBoxHeaderThemeFontWeight">Normal</FontWeight>
-    <FontWeight x:Key="ComboBoxPlaceholderTextThemeFontWeight">SemiLight</FontWeight>
     <StaticResource x:Key="ComboBoxItemForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="ComboBoxItemForegroundPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="ComboBoxItemForegroundPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="ComboBoxItemForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
     <StaticResource x:Key="ComboBoxItemForegroundSelected" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    <StaticResource x:Key="ComboBoxItemForegroundSelectedUnfocused" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="ComboBoxItemForegroundSelectedPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="ComboBoxItemForegroundSelectedPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="ComboBoxItemForegroundSelectedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
@@ -147,20 +101,16 @@
     <StaticResource x:Key="ComboBoxItemBackgroundPointerOver" ResourceKey="SystemControlHighlightListLowBrush" />
     <StaticResource x:Key="ComboBoxItemBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ComboBoxItemBackgroundSelected" ResourceKey="SystemControlHighlightListAccentLowBrush" />
-    <StaticResource x:Key="ComboBoxItemBackgroundSelectedUnfocused" ResourceKey="SystemControlHighlightListAccentLowBrush" />
     <StaticResource x:Key="ComboBoxItemBackgroundSelectedPressed" ResourceKey="SystemControlHighlightListAccentHighBrush" />
     <StaticResource x:Key="ComboBoxItemBackgroundSelectedPointerOver" ResourceKey="SystemControlHighlightListAccentMediumBrush" />
     <StaticResource x:Key="ComboBoxItemBackgroundSelectedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrush" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ComboBoxItemBorderBrushPressed" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ComboBoxItemBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ComboBoxItemBorderBrushDisabled" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ComboBoxItemBorderBrushSelected" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ComboBoxItemBorderBrushSelectedUnfocused" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ComboBoxItemBorderBrushSelectedPressed" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ComboBoxItemBorderBrushSelectedPointerOver" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ComboBoxItemBorderBrushSelectedDisabled" ResourceKey="SystemControlTransparentBrush" />
-
     <StaticResource x:Key="ComboBoxBackground" ResourceKey="SystemControlBackgroundAltMediumLowBrush" />
     <StaticResource x:Key="ComboBoxBackgroundPointerOver" ResourceKey="SystemControlPageBackgroundAltMediumBrush" />
     <StaticResource x:Key="ComboBoxBackgroundPressed" ResourceKey="SystemControlBackgroundListMediumBrush" />
@@ -182,81 +132,18 @@
     <StaticResource x:Key="ComboBoxDropDownGlyphForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
     <StaticResource x:Key="ComboBoxDropDownGlyphForegroundFocused" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
     <StaticResource x:Key="ComboBoxDropDownGlyphForegroundFocusedPressed" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
-    <StaticResource x:Key="ComboBoxDropDownForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="ComboBoxDropDownBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
     <StaticResource x:Key="ComboBoxDropDownBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
-
-    <StaticResource x:Key="ComboBoxLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
-    <SolidColorBrush x:Key="ComboBoxArrowDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="ComboBoxArrowForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ComboBoxArrowPressedForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ComboBoxBackgroundThemeBrush" Color="#CCFFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxBorderThemeBrush" Color="#45000000" />
-    <SolidColorBrush x:Key="ComboBoxDisabledBackgroundThemeBrush" Color="#66CACACA" />
-    <SolidColorBrush x:Key="ComboBoxDisabledBorderThemeBrush" Color="#26000000" />
-    <SolidColorBrush x:Key="ComboBoxDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="ComboBoxFocusedBackgroundThemeBrush" Color="White" />
-    <SolidColorBrush x:Key="ComboBoxFocusedBorderThemeBrush" Color="#70000000" />
-    <SolidColorBrush x:Key="ComboBoxFocusedForegroundThemeBrush" Color="White" />
-    <SolidColorBrush x:Key="ComboBoxForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ComboBoxHeaderForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ComboBoxItemDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="ComboBoxItemPointerOverBackgroundThemeBrush" Color="#21000000" />
-    <SolidColorBrush x:Key="ComboBoxItemPointerOverForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ComboBoxItemPressedBackgroundThemeBrush" Color="#FFD3D3D3" />
-    <SolidColorBrush x:Key="ComboBoxItemPressedForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ComboBoxItemSelectedBackgroundThemeBrush" Color="#FF4617B4" />
-    <SolidColorBrush x:Key="ComboBoxItemSelectedForegroundThemeBrush" Color="White" />
-    <SolidColorBrush x:Key="ComboBoxItemSelectedDisabledBackgroundThemeBrush" Color="#8C000000" />
-    <SolidColorBrush x:Key="ComboBoxItemSelectedDisabledForegroundThemeBrush" Color="#99FFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxItemSelectedPointerOverBackgroundThemeBrush" Color="#FF5F37BE" />
-    <SolidColorBrush x:Key="ComboBoxPlaceholderTextForegroundThemeBrush" Color="#88000000" />
-    <SolidColorBrush x:Key="ComboBoxPointerOverBackgroundThemeBrush" Color="#DEFFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxPointerOverBorderThemeBrush" Color="#70000000" />
-    <SolidColorBrush x:Key="ComboBoxPopupBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxPopupBorderThemeBrush" Color="#FF212121" />
-    <SolidColorBrush x:Key="ComboBoxPopupForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ComboBoxPressedBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ComboBoxPressedBorderThemeBrush" Color="#A3000000" />
-    <SolidColorBrush x:Key="ComboBoxPressedHighlightThemeBrush" Color="#FFD3D3D3" />
-    <SolidColorBrush x:Key="ComboBoxPressedForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ComboBoxSelectedBackgroundThemeBrush" Color="#FF4617B4" />
-    <SolidColorBrush x:Key="ComboBoxSelectedPointerOverBackgroundThemeBrush" Color="#FF5F37BE" />
-
     <Thickness x:Key="ComboBoxDropdownBorderPadding">0</Thickness>
     <Thickness x:Key="ComboBoxDropdownContentMargin">0,4,0,4</Thickness>
-    <StaticResource x:Key="ComboBoxDropDownBackgroundPointerOver" ResourceKey="SystemControlBackgroundListLowBrush" />
-    <StaticResource x:Key="ComboBoxDropDownBackgroundPointerPressed" ResourceKey="SystemControlBackgroundListMediumBrush" />
-    <StaticResource x:Key="ComboBoxFocusedDropDownBackgroundPointerOver" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="ComboBoxFocusedDropDownBackgroundPointerPressed" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
-    <StaticResource x:Key="ComboBoxEditableDropDownGlyphForeground" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
-
+    
     <!-- Resources for ListBox.xaml -->
     <Thickness x:Key="ListBoxBorderThemeThickness">0</Thickness>
-    <SolidColorBrush x:Key="ListBoxBackgroundThemeBrush" Color="#CCFFFFFF" />
-    <SolidColorBrush x:Key="ListBoxBorderThemeBrush" Color="#45000000" />
-    <SolidColorBrush x:Key="ListBoxDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="ListBoxFocusBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ListBoxForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ListBoxItemDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="ListBoxItemPointerOverBackgroundThemeBrush" Color="#21000000" />
-    <SolidColorBrush x:Key="ListBoxItemPointerOverForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ListBoxItemPressedBackgroundThemeBrush" Color="#FFD3D3D3" />
-    <SolidColorBrush x:Key="ListBoxItemPressedForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedBackgroundThemeBrush" Color="#FF4617B4" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedDisabledBackgroundThemeBrush" Color="#8C000000" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedDisabledForegroundThemeBrush" Color="#99FFFFFF" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedForegroundThemeBrush" Color="White" />
-    <SolidColorBrush x:Key="ListBoxItemSelectedPointerOverBackgroundThemeBrush" Color="#FF5F37BE" />
-    <!-- Resources for ProgressBar.xaml -->
-    <x:Double x:Key="ProgressBarIndicatorPauseOpacity">0.6</x:Double>
+    
+    <!-- Resources for ProgressBar.xaml -->    
     <x:Double x:Key="ProgressBarThemeMinHeight">4</x:Double>
     <Thickness x:Key="ProgressBarBorderThemeThickness">0</Thickness>
-    <SolidColorBrush x:Key="ProgressBarBackgroundThemeBrush" Color="#30000000" />
-    <SolidColorBrush x:Key="ProgressBarBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ProgressBarForegroundThemeBrush" Color="#FF4617B4" />
-    <SolidColorBrush x:Key="ProgressBarIndeterminateForegroundThemeBrush" Color="#FF4617B4" />
-
+    
     <!-- Resources for MenuFlyout.xaml (Menu, ContextMenu, etc) -->
     <x:Double x:Key="MenuFlyoutSeparatorThemeHeight">1</x:Double>
     <x:Double x:Key="MenuFlyoutThemeMinHeight">32</x:Double>
@@ -276,7 +163,6 @@
     <StaticResource x:Key="MenuFlyoutSubItemChevronPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="MenuFlyoutSubItemChevronSubMenuOpened" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="MenuFlyoutSubItemChevronDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="MenuFlyoutLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
     <StaticResource x:Key="MenuFlyoutItemKeyboardAcceleratorTextForeground" ResourceKey="SystemControlForegroundBaseMediumBrush" />
     <StaticResource x:Key="MenuFlyoutItemKeyboardAcceleratorTextForegroundPointerOver" ResourceKey="SystemControlHighlightAltBaseMediumBrush" />
     <StaticResource x:Key="MenuFlyoutItemKeyboardAcceleratorTextForegroundPressed" ResourceKey="SystemControlHighlightAltBaseMediumBrush" />
@@ -286,41 +172,41 @@
     <StaticResource x:Key="MenuFlyoutPresenterBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
     <StaticResource x:Key="MenuFlyoutPresenterBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
     <Thickness x:Key="MenuFlyoutPresenterBorderThemeThickness">1</Thickness>
-
+        
     <!-- Resources for TextBox.xaml -->
-    <SolidColorBrush x:Key="TextBoxForegroundHeaderThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="TextBoxPlaceholderTextThemeBrush" Color="#AB000000" />
-    <SolidColorBrush x:Key="TextBoxBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="TextBoxBorderThemeBrush" Color="#A3000000" />
-    <SolidColorBrush x:Key="TextBoxButtonBackgroundThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="TextBoxButtonBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="TextBoxButtonForegroundThemeBrush" Color="#99000000" />
-    <SolidColorBrush x:Key="TextBoxButtonPointerOverBackgroundThemeBrush" Color="#FFDEDEDE" />
-    <SolidColorBrush x:Key="TextBoxButtonPointerOverBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="TextBoxButtonPointerOverForegroundThemeBrush" Color="Black" />
-    <SolidColorBrush x:Key="TextBoxButtonPressedBackgroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="TextBoxButtonPressedBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="TextBoxButtonPressedForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="TextBoxDisabledBackgroundThemeBrush" Color="#66CACACA" />
-    <SolidColorBrush x:Key="TextBoxDisabledBorderThemeBrush" Color="#26000000" />
-    <SolidColorBrush x:Key="TextBoxDisabledForegroundThemeBrush" Color="#FF666666" />
-    <SolidColorBrush x:Key="TextBoxForegroundThemeBrush" Color="#FF000000" />
+    <StaticResource x:Key="TextControlForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
+    <StaticResource x:Key="TextControlForegroundPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
+    <StaticResource x:Key="TextControlForegroundDisabled" ResourceKey="SystemControlDisabledChromeDisabledLowBrush" />
+    <StaticResource x:Key="TextControlBackground" ResourceKey="SystemControlBackgroundAltMediumLowBrush" />
+    <StaticResource x:Key="TextControlBackgroundPointerOver" ResourceKey="SystemControlBackgroundAltMediumBrush" />
+    <StaticResource x:Key="TextControlBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
+    <StaticResource x:Key="TextControlBorderBrushFocused" ResourceKey="SystemControlHighlightAccentBrush" />
+    <StaticResource x:Key="TextControlBorderBrushDisabled" ResourceKey="SystemControlDisabledBaseLowBrush" />
+    <StaticResource x:Key="TextControlPlaceholderForeground" ResourceKey="SystemControlPageTextBaseMediumBrush" />
+    <StaticResource x:Key="TextControlPlaceholderForegroundPointerOver" ResourceKey="SystemControlPageTextBaseMediumBrush" />
+    <StaticResource x:Key="TextControlPlaceholderForegroundDisabled" ResourceKey="SystemControlDisabledChromeDisabledLowBrush" />    
+    <StaticResource x:Key="TextControlSelectionHighlightColor" ResourceKey="SystemControlHighlightAccentBrush" />
+    <StaticResource x:Key="TextControlButtonBackground" ResourceKey="SystemControlTransparentBrush" />
+    <StaticResource x:Key="TextControlButtonBackgroundPointerOver" ResourceKey="SystemControlTransparentBrush" />
+    <StaticResource x:Key="TextControlButtonBackgroundPressed" ResourceKey="SystemControlHighlightAccentBrush" />
+    <StaticResource x:Key="TextControlButtonBorderBrush" ResourceKey="SystemControlTransparentBrush" />
+    <StaticResource x:Key="TextControlButtonBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
+    <StaticResource x:Key="TextControlButtonBorderBrushPressed" ResourceKey="SystemControlTransparentBrush" />
+    <StaticResource x:Key="TextControlButtonForegroundPointerOver" ResourceKey="SystemControlHighlightAccentBrush" />
+    <StaticResource x:Key="TextControlButtonForegroundPressed" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />    
     <StaticResource x:Key="TextControlBackgroundFocused" ResourceKey="SystemControlBackgroundAltHighBrush" />
     <StaticResource x:Key="TextControlBorderBrush" ResourceKey="SystemControlForegroundBaseMediumBrush" />
     <StaticResource x:Key="TextControlBorderBrushPointerOver" ResourceKey="SystemControlHighlightBaseMediumHighBrush" />
     <StaticResource x:Key="TextControlButtonForeground" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
     <StaticResource x:Key="TextControlForegroundFocused" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="TextControlPlaceholderForegroundFocused" ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
-
+    
     <!-- Resources for AutoCompleteBox.xaml -->
     <StaticResource x:Key="AutoCompleteBoxSuggestionsListBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
     <StaticResource x:Key="AutoCompleteBoxSuggestionsListBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
-    <StaticResource x:Key="AutoCompleteBoxLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
-    <x:Double x:Key="AutoCompleteBoxIconFontSize">12</x:Double>
-
+   
     <!-- Resources for CheckBox.xaml -->
     <Thickness x:Key="CheckBoxBorderThemeThickness">1</Thickness>
-    <Thickness x:Key="CheckBoxCheckedStrokeThickness">0</Thickness>
     <StaticResource x:Key="CheckBoxForegroundUnchecked" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="CheckBoxForegroundUncheckedPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="CheckBoxForegroundUncheckedPressed" ResourceKey="SystemControlForegroundBaseHighBrush" />
@@ -360,8 +246,7 @@
     <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUnchecked" ResourceKey="SystemControlForegroundBaseMediumBrush" />
     <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUncheckedPointerOver" ResourceKey="SystemControlHighlightBaseMediumHighBrush" />
     <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUncheckedPressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUncheckedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeChecked" ResourceKey="SystemControlHighlightTransparentBrush" />
+    <StaticResource x:Key="CheckBoxCheckBackgroundStrokeUncheckedDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />    
     <StaticResource x:Key="CheckBoxCheckBackgroundStrokeCheckedPointerOver" ResourceKey="SystemAccentColorLight1" />
     <StaticResource x:Key="CheckBoxCheckBackgroundStrokeCheckedPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
     <StaticResource x:Key="CheckBoxCheckBackgroundStrokeCheckedDisabled" ResourceKey="SystemControlTransparentBrush" />
@@ -393,23 +278,8 @@
     <StaticResource x:Key="CheckBoxCheckGlyphForegroundIndeterminatePointerOver" ResourceKey="SystemControlForegroundChromeWhiteBrush" />
     <StaticResource x:Key="CheckBoxCheckGlyphForegroundIndeterminatePressed" ResourceKey="SystemControlForegroundChromeWhiteBrush" />
     <StaticResource x:Key="CheckBoxCheckGlyphForegroundIndeterminateDisabled" ResourceKey="SystemControlForegroundChromeWhiteBrush" />
-    <SolidColorBrush x:Key="CheckBoxBackgroundThemeBrush" Color="#CCFFFFFF" />
-    <SolidColorBrush x:Key="CheckBoxBorderThemeBrush" Color="#45000000" />
-    <SolidColorBrush x:Key="CheckBoxContentDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="CheckBoxContentForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="CheckBoxDisabledBackgroundThemeBrush" Color="#66CACACA" />
-    <SolidColorBrush x:Key="CheckBoxDisabledBorderThemeBrush" Color="#26000000" />
-    <SolidColorBrush x:Key="CheckBoxDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="CheckBoxForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="CheckBoxPointerOverBackgroundThemeBrush" Color="#DEFFFFFF" />
-    <SolidColorBrush x:Key="CheckBoxPointerOverForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="CheckBoxPointerOverBorderThemeBrush" Color="#70000000" />
-    <SolidColorBrush x:Key="CheckBoxPressedBackgroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="CheckBoxPressedBorderThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="CheckBoxPressedForegroundThemeBrush" Color="#FFFFFFFF" />
-
+      
     <!-- Resources for Calendar.xaml, CalendarButton.xaml, CalendarDayButton.xaml, CalendarItem.xaml -->
-    <StaticResource x:Key="CalendarViewFocusBorderBrush" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="CalendarViewSelectedHoverBorderBrush" ResourceKey="SystemControlHighlightListAccentMediumBrush" />
     <StaticResource x:Key="CalendarViewSelectedPressedBorderBrush" ResourceKey="SystemControlHighlightListAccentHighBrush" />
     <StaticResource x:Key="CalendarViewSelectedBorderBrush" ResourceKey="SystemControlHighlightAccentBrush" />
@@ -417,12 +287,9 @@
     <StaticResource x:Key="CalendarViewPressedBorderBrush" ResourceKey="SystemControlHighlightBaseMediumBrush" />
     <StaticResource x:Key="CalendarViewTodayForeground" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
     <StaticResource x:Key="CalendarViewBlackoutForeground" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="CalendarViewSelectedForeground" ResourceKey="SystemControlHighlightBaseHighBrush" />
-    <StaticResource x:Key="CalendarViewPressedForeground" ResourceKey="SystemControlHighlightBaseHighBrush" />
     <StaticResource x:Key="CalendarViewOutOfScopeForeground" ResourceKey="SystemControlHyperlinkBaseHighBrush" />
     <StaticResource x:Key="CalendarViewCalendarItemForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="CalendarViewOutOfScopeBackground" ResourceKey="SystemControlDisabledChromeMediumLowBrush" />
-    <StaticResource x:Key="CalendarViewCalendarItemBackground" ResourceKey="SystemControlBackgroundAltHighBrush" />
     <StaticResource x:Key="CalendarViewForeground" ResourceKey="SystemControlHyperlinkBaseMediumHighBrush" />
     <StaticResource x:Key="CalendarViewBackground" ResourceKey="SystemControlBackgroundAltHighBrush" />
     <StaticResource x:Key="CalendarViewBorderBrush" ResourceKey="SystemControlForegroundChromeMediumBrush" />
@@ -430,12 +297,11 @@
     <StaticResource x:Key="CalendarViewNavigationButtonBackground" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="CalendarViewNavigationButtonForegroundPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="CalendarViewNavigationButtonForegroundPressed" ResourceKey="SystemControlForegroundBaseMediumBrush" />
-    <StaticResource x:Key="CalendarViewNavigationButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
     <StaticResource x:Key="CalendarViewCalendarItemRevealBackground" ResourceKey="SystemControlTransparentRevealBackgroundBrush" />
     <StaticResource x:Key="CalendarViewCalendarItemRevealBorderBrush" ResourceKey="SystemControlTransparentRevealBorderBrush" />
     <StaticResource x:Key="CalendarViewNavigationButtonBorderBrushPointerOver" ResourceKey="SystemControlHighlightTransparentBrush" />
     <StaticResource x:Key="CalendarViewNavigationButtonBorderBrush" ResourceKey="SystemControlTransparentBrush" />
-
+    
     <!--Resources for NotificationCard.xaml -->
     <SolidColorBrush x:Key="NotificationCardBackgroundBrush" Color="White" />
     <SolidColorBrush x:Key="NotificationCardProgressBackgroundBrush" Color="#9A9A9A" />
@@ -482,27 +348,11 @@
     <StaticResource x:Key="RadioButtonCheckGlyphStrokePointerOver" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="RadioButtonCheckGlyphStrokePressed" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="RadioButtonCheckGlyphStrokeDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <SolidColorBrush x:Key="RadioButtonBackgroundThemeBrush" Color="#CCFFFFFF" />
-    <SolidColorBrush x:Key="RadioButtonBorderThemeBrush" Color="#45000000" />
-    <SolidColorBrush x:Key="RadioButtonContentDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="RadioButtonContentForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="RadioButtonDisabledBackgroundThemeBrush" Color="#66CACACA" />
-    <SolidColorBrush x:Key="RadioButtonDisabledBorderThemeBrush" Color="#26000000" />
-    <SolidColorBrush x:Key="RadioButtonDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="RadioButtonForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="RadioButtonPointerOverBackgroundThemeBrush" Color="#DEFFFFFF" />
-    <SolidColorBrush x:Key="RadioButtonPointerOverBorderThemeBrush" Color="#70000000" />
-    <SolidColorBrush x:Key="RadioButtonPointerOverForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="RadioButtonPressedBackgroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="RadioButtonPressedBorderThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="RadioButtonPressedForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="RadioButtonContentPointerOverForegroundThemeBrush" Color="{DynamicResource SystemColorHighlightTextColor}" />
-
+    
     <!-- Resources for Slider.xaml -->
     <x:Double x:Key="SliderOutsideTickBarThemeHeight">4</x:Double>
     <x:Double x:Key="SliderTrackThemeHeight">2</x:Double>
     <Thickness x:Key="SliderBorderThemeThickness">0</Thickness>
-    <Thickness x:Key="SliderHeaderThemeMargin">0,0,0,4</Thickness>
     <FontWeight x:Key="SliderHeaderThemeFontWeight">Normal</FontWeight>
     <StaticResource x:Key="SliderContainerBackground" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="SliderContainerBackgroundPointerOver" ResourceKey="SystemControlTransparentBrush" />
@@ -525,44 +375,18 @@
     <StaticResource x:Key="SliderTickBarFill" ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
     <StaticResource x:Key="SliderTickBarFillDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
     <StaticResource x:Key="SliderInlineTickBarFill" ResourceKey="SystemControlBackgroundAltHighBrush" />
-    <SolidColorBrush x:Key="SliderBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="SliderDisabledBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="SliderThumbBackgroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="SliderThumbBorderThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="SliderThumbDisabledBackgroundThemeBrush" Color="#FF929292" />
-    <SolidColorBrush x:Key="SliderThumbPointerOverBackgroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="SliderThumbPointerOverBorderThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="SliderThumbPressedBackgroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="SliderThumbPressedBorderThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="SliderTickMarkInlineBackgroundThemeBrush" Color="White" />
-    <SolidColorBrush x:Key="SliderTickMarkInlineDisabledForegroundThemeBrush" Color="White" />
-    <SolidColorBrush x:Key="SliderTickmarkOutsideBackgroundThemeBrush" Color="#80000000" />
-    <SolidColorBrush x:Key="SliderTickMarkOutsideDisabledForegroundThemeBrush" Color="#80000000" />
-    <SolidColorBrush x:Key="SliderTrackBackgroundThemeBrush" Color="#1A000000" />
-    <SolidColorBrush x:Key="SliderTrackDecreaseBackgroundThemeBrush" Color="#FF4617B4" />
-    <SolidColorBrush x:Key="SliderTrackDecreaseDisabledBackgroundThemeBrush" Color="#1C000000" />
-    <SolidColorBrush x:Key="SliderTrackDecreasePointerOverBackgroundThemeBrush" Color="#FF5F37BE" />
-    <SolidColorBrush x:Key="SliderTrackDecreasePressedBackgroundThemeBrush" Color="#FF7241E4" />
-    <SolidColorBrush x:Key="SliderTrackDisabledBackgroundThemeBrush" Color="#1A000000" />
-    <SolidColorBrush x:Key="SliderTrackPointerOverBackgroundThemeBrush" Color="#26000000" />
-    <SolidColorBrush x:Key="SliderTrackPressedBackgroundThemeBrush" Color="#33000000" />
-    <SolidColorBrush x:Key="SliderHeaderForegroundThemeBrush" Color="#FF000000" />
-
+   
     <!--Recources ToggleSwitch-->
     <Thickness x:Key="ToggleSwitchOnStrokeThickness">0</Thickness>
     <Thickness x:Key="ToggleSwitchOuterBorderStrokeThickness">1</Thickness>
     <StaticResource x:Key="ToggleSwitchContentForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="ToggleSwitchContentForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleSwitchHeaderForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="ToggleSwitchHeaderForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
     <StaticResource x:Key="ToggleSwitchContainerBackground" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ToggleSwitchContainerBackgroundPointerOver" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ToggleSwitchContainerBackgroundPressed" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ToggleSwitchContainerBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ToggleSwitchFillOff" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ToggleSwitchFillOffPointerOver" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ToggleSwitchFillOffPressed" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
-    <StaticResource x:Key="ToggleSwitchFillOffDisabled" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ToggleSwitchStrokeOff" ResourceKey="SystemControlForegroundBaseMediumBrush" />
     <StaticResource x:Key="ToggleSwitchStrokeOffPointerOver" ResourceKey="SystemControlHighlightBaseMediumHighBrush" />
     <StaticResource x:Key="ToggleSwitchStrokeOffPressed" ResourceKey="SystemControlForegroundBaseHighBrush" />
@@ -583,46 +407,19 @@
     <StaticResource x:Key="ToggleSwitchKnobFillOnPointerOver" ResourceKey="SystemControlHighlightChromeWhiteBrush" />
     <StaticResource x:Key="ToggleSwitchKnobFillOnPressed" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />
     <StaticResource x:Key="ToggleSwitchKnobFillOnDisabled" ResourceKey="SystemControlPageBackgroundBaseLowBrush" />
-    <SolidColorBrush x:Key="ToggleSwitchCurtainBackgroundThemeBrush" Color="#FF4617B4" />
-    <SolidColorBrush x:Key="ToggleSwitchCurtainDisabledBackgroundThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ToggleSwitchCurtainPointerOverBackgroundThemeBrush" Color="#FF5F37BE" />
-    <SolidColorBrush x:Key="ToggleSwitchCurtainPressedBackgroundThemeBrush" Color="#FF7241E4" />
-    <SolidColorBrush x:Key="ToggleSwitchDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="ToggleSwitchForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleSwitchHeaderDisabledForegroundThemeBrush" Color="#66000000" />
-    <SolidColorBrush x:Key="ToggleSwitchHeaderForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleSwitchOuterBorderBorderThemeBrush" Color="#59000000" />
-    <SolidColorBrush x:Key="ToggleSwitchOuterBorderDisabledBorderThemeBrush" Color="#33000000" />
-    <SolidColorBrush x:Key="ToggleSwitchThumbBackgroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleSwitchThumbBorderThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleSwitchThumbDisabledBackgroundThemeBrush" Color="#FF929292" />
-    <SolidColorBrush x:Key="ToggleSwitchThumbDisabledBorderThemeBrush" Color="#FF929292" />
-    <SolidColorBrush x:Key="ToggleSwitchThumbPointerOverBackgroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleSwitchThumbPointerOverBorderThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleSwitchThumbPressedBackgroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleSwitchThumbPressedForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ToggleSwitchTrackBackgroundThemeBrush" Color="#59000000" />
-    <SolidColorBrush x:Key="ToggleSwitchTrackBorderThemeBrush" Color="Transparent" />
-    <SolidColorBrush x:Key="ToggleSwitchTrackDisabledBackgroundThemeBrush" Color="#1F000000" />
-    <SolidColorBrush x:Key="ToggleSwitchTrackPointerOverBackgroundThemeBrush" Color="#4A000000" />
-    <SolidColorBrush x:Key="ToggleSwitchTrackPressedBackgroundThemeBrush" Color="#42000000" />
-
+    
     <!-- Resources for ToolTip.xaml -->
     <x:Double x:Key="ToolTipContentThemeFontSize">12</x:Double>
     <Thickness x:Key="ToolTipBorderThemeThickness">1</Thickness>
     <StaticResource x:Key="ToolTipForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="ToolTipBackground" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
     <StaticResource x:Key="ToolTipBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
-    <SolidColorBrush x:Key="ToolTipBackgroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ToolTipBorderThemeBrush" Color="#FF808080" />
-    <SolidColorBrush x:Key="ToolTipForegroundThemeBrush" Color="#FF666666" />
     <Thickness x:Key="ToolTipBorderThemePadding">8,5,8,7</Thickness>
-
+    
     <!-- Resources for DatePicker.xaml-->
     <StaticResource x:Key="DatePickerSpacerFill" ResourceKey="SystemControlForegroundBaseLowBrush" />
     <StaticResource x:Key="DatePickerSpacerFillDisabled" ResourceKey="SystemControlDisabledBaseLowBrush" />
     <StaticResource x:Key="DatePickerHeaderForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
-    <StaticResource x:Key="DatePickerHeaderForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
     <StaticResource x:Key="DatePickerButtonBorderBrush" ResourceKey="SystemControlForegroundBaseMediumBrush" />
     <StaticResource x:Key="DatePickerButtonBorderBrushPointerOver" ResourceKey="SystemControlHighlightBaseMediumHighBrush" />
     <StaticResource x:Key="DatePickerButtonBorderBrushPressed" ResourceKey="SystemControlHighlightBaseMediumBrush" />
@@ -631,17 +428,14 @@
     <StaticResource x:Key="DatePickerButtonBackgroundPointerOver" ResourceKey="SystemControlPageBackgroundAltMediumBrush" />
     <StaticResource x:Key="DatePickerButtonBackgroundPressed" ResourceKey="SystemControlBackgroundBaseLowBrush" />
     <StaticResource x:Key="DatePickerButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="DatePickerButtonBackgroundFocused" ResourceKey="SystemControlHighlightListAccentLowBrush" />
     <StaticResource x:Key="DatePickerButtonForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="DatePickerButtonForegroundPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
     <StaticResource x:Key="DatePickerButtonForegroundPressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
     <StaticResource x:Key="DatePickerButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="DatePickerButtonForegroundFocused" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="DatePickerFlyoutPresenterBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
     <StaticResource x:Key="DatePickerFlyoutPresenterBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
     <StaticResource x:Key="DatePickerFlyoutPresenterSpacerFill" ResourceKey="SystemControlForegroundBaseLowBrush" />
     <StaticResource x:Key="DatePickerFlyoutPresenterHighlightFill" ResourceKey="SystemControlHighlightListAccentLowBrush" />
-    <StaticResource x:Key="DatePickerLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
 
     <StaticResource x:Key="DateTimePickerFlyoutButtonBackground" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="DateTimePickerFlyoutButtonBackgroundPointerOver" ResourceKey="SystemControlHighlightListLowBrush" />
@@ -651,7 +445,7 @@
     <StaticResource x:Key="DateTimePickerFlyoutButtonBorderBrushPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
     <StaticResource x:Key="DateTimePickerFlyoutButtonForegroundPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="DateTimePickerFlyoutButtonForegroundPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
-    
+  
     <!-- Resources for TimePicker.xaml -->
     <StaticResource x:Key="TimePickerSpacerFill" ResourceKey="SystemControlForegroundBaseLowBrush" />
     <StaticResource x:Key="TimePickerSpacerFillDisabled" ResourceKey="SystemControlDisabledBaseLowBrush" />
@@ -665,30 +459,22 @@
     <StaticResource x:Key="TimePickerButtonBackgroundPointerOver" ResourceKey="SystemControlPageBackgroundAltMediumBrush" />
     <StaticResource x:Key="TimePickerButtonBackgroundPressed" ResourceKey="SystemControlBackgroundBaseLowBrush" />
     <StaticResource x:Key="TimePickerButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
-    <StaticResource x:Key="TimePickerButtonBackgroundFocused" ResourceKey="SystemControlHighlightListAccentLowBrush" />
     <StaticResource x:Key="TimePickerButtonForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="TimePickerButtonForegroundPointerOver" ResourceKey="SystemControlHighlightBaseHighBrush" />
     <StaticResource x:Key="TimePickerButtonForegroundPressed" ResourceKey="SystemControlHighlightBaseHighBrush" />
     <StaticResource x:Key="TimePickerButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="TimePickerButtonForegroundFocused" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
     <StaticResource x:Key="TimePickerFlyoutPresenterBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
     <StaticResource x:Key="TimePickerFlyoutPresenterBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
     <StaticResource x:Key="TimePickerFlyoutPresenterSpacerFill" ResourceKey="SystemControlForegroundBaseLowBrush" />
     <StaticResource x:Key="TimePickerFlyoutPresenterHighlightFill" ResourceKey="SystemControlHighlightListAccentLowBrush" />
-    <StaticResource x:Key="TimePickerLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
-    <SolidColorBrush x:Key="TimePickerForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="TimePickerHeaderForegroundThemeBrush" Color="#FF000000" />
-    
+        
     <!-- Resources for TabItem.xaml -->
-    <FontFamily x:Key="TabItemHeaderFontFamily">XamlAutoFontFamily</FontFamily>
     <x:Double x:Key="TabItemHeaderFontSize">24</x:Double>
-    <x:Double x:Key="TabItemHeaderLockedTranslation">40</x:Double>
-    <x:Int32 x:Key="TabItemHeaderCharacterSpacing">-25</x:Int32>
     <Thickness x:Key="TabItemHeaderMargin">12,0,12,0</Thickness>
     <Thickness x:Key="TabItemMargin">12,0,12,0</Thickness>
     <FontWeight x:Key="TabItemHeaderThemeFontWeight">SemiLight</FontWeight>
     <StaticResource x:Key="TabControlBackground" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TabItemHeaderBackground" ResourceKey="SystemControlTransparentBrush" />
+     
     <!-- Resources for TabItem -->
     <StaticResource x:Key="TabItemHeaderBackgroundUnselected" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="TabItemHeaderBackgroundUnselectedPointerOver" ResourceKey="SystemControlHighlightTransparentBrush" />
@@ -704,23 +490,17 @@
     <StaticResource x:Key="TabItemHeaderForegroundSelectedPointerOver" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
     <StaticResource x:Key="TabItemHeaderForegroundSelectedPressed" ResourceKey="SystemControlHighlightAltBaseMediumHighBrush" />
     <StaticResource x:Key="TabItemHeaderForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
-    <StaticResource x:Key="TabItemHeaderFocusPipeFill" ResourceKey="SystemControlHighlightAltAccentBrush" />
     <StaticResource x:Key="TabItemHeaderSelectedPipeFill" ResourceKey="SystemControlHighlightAltAccentBrush" />
-
+ 
     <!-- Resources for ScrollBar.xaml -->
     <x:Double x:Key="ScrollBarTrackBorderThemeThickness">0</x:Double>
-    <Thickness x:Key="ScrollBarPanningBorderThemeThickness">1</Thickness>
     <StaticResource x:Key="ScrollBarBackground" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ScrollBarBackgroundPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ScrollBarForeground" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ScrollBarBorderBrush" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="ScrollBarBorderBrushDisabled" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ScrollBarButtonBackground" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ScrollBarButtonBackgroundPointerOver" ResourceKey="SystemControlBackgroundListLowBrush" />
     <StaticResource x:Key="ScrollBarButtonBackgroundPressed" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
-    <StaticResource x:Key="ScrollBarButtonBackgroundDisabled" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ScrollBarButtonBorderBrush" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ScrollBarButtonBorderBrushPointerOver" ResourceKey="SystemControlTransparentBrush" />
     <StaticResource x:Key="ScrollBarButtonBorderBrushPressed" ResourceKey="SystemControlTransparentBrush" />
@@ -729,46 +509,19 @@
     <StaticResource x:Key="ScrollBarButtonArrowForegroundPointerOver" ResourceKey="SystemControlForegroundBaseHighBrush" />
     <StaticResource x:Key="ScrollBarButtonArrowForegroundPressed" ResourceKey="SystemControlForegroundAltHighBrush" />
     <StaticResource x:Key="ScrollBarButtonArrowForegroundDisabled" ResourceKey="SystemControlForegroundBaseLowBrush" />
-    <StaticResource x:Key="ScrollBarThumbFill" ResourceKey="SystemControlForegroundChromeDisabledLowBrush" />
     <StaticResource x:Key="ScrollBarThumbFillPointerOver" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
     <StaticResource x:Key="ScrollBarThumbFillPressed" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
     <StaticResource x:Key="ScrollBarThumbFillDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
     <SolidColorBrush x:Key="ScrollBarTrackFill" Color="{StaticResource SystemChromeMediumColor}" Opacity="0.9" />
     <SolidColorBrush x:Key="ScrollBarTrackFillPointerOver" Color="{StaticResource SystemChromeMediumColor}" Opacity="0.9" />
-    <StaticResource x:Key="ScrollBarTrackFillDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
     <StaticResource x:Key="ScrollBarTrackStroke" ResourceKey="SystemControlForegroundTransparentBrush" />
     <StaticResource x:Key="ScrollBarTrackStrokePointerOver" ResourceKey="SystemControlForegroundTransparentBrush" />
-    <StaticResource x:Key="ScrollBarTrackStrokeDisabled" ResourceKey="SystemControlDisabledTransparentBrush" />
-    <SolidColorBrush x:Key="ScrollBarThumbBackground" Color="{StaticResource ScrollBarThumbBackgroundColor}" />
-    <SolidColorBrush x:Key="ScrollBarPanningThumbBackground" Color="{StaticResource ScrollBarPanningThumbBackgroundColor}" />
-    <StaticResource x:Key="ScrollBarPanningThumbBackgroundDisabled" ResourceKey="SystemControlDisabledChromeHighBrush" />
-    <SolidColorBrush x:Key="ScrollBarButtonForegroundThemeBrush" Color="#99000000" />
-    <SolidColorBrush x:Key="ScrollBarButtonPointerOverBackgroundThemeBrush" Color="#FFDADADA" />
-    <SolidColorBrush x:Key="ScrollBarButtonPointerOverBorderThemeBrush" Color="#FFDADADA" />
-    <SolidColorBrush x:Key="ScrollBarButtonPointerOverForegroundThemeBrush" Color="#FF000000" />
-    <SolidColorBrush x:Key="ScrollBarButtonPressedBackgroundThemeBrush" Color="#99000000" />
-    <SolidColorBrush x:Key="ScrollBarButtonPressedBorderThemeBrush" Color="#99000000" />
-    <SolidColorBrush x:Key="ScrollBarButtonPressedForegroundThemeBrush" Color="#FFFFFFFF" />
-    <SolidColorBrush x:Key="ScrollBarPanningBackgroundThemeBrush" Color="#FFCDCDCD" />
-    <SolidColorBrush x:Key="ScrollBarPanningBorderThemeBrush" Color="#7D9A9A9A" />
-    <SolidColorBrush x:Key="ScrollBarThumbBackgroundThemeBrush" Color="#FFCDCDCD" />
-    <SolidColorBrush x:Key="ScrollBarThumbBorderThemeBrush" Color="#3B555555" />
-    <SolidColorBrush x:Key="ScrollBarThumbPointerOverBackgroundThemeBrush" Color="#FFDADADA" />
-    <SolidColorBrush x:Key="ScrollBarThumbPointerOverBorderThemeBrush" Color="#6BB7B7B7" />
-    <SolidColorBrush x:Key="ScrollBarThumbPressedBackgroundThemeBrush" Color="#99000000" />
-    <SolidColorBrush x:Key="ScrollBarThumbPressedBorderThemeBrush" Color="#ED555555" />
-    <SolidColorBrush x:Key="ScrollBarTrackBackgroundThemeBrush" Color="#59D5D5D5" />
-    <SolidColorBrush x:Key="ScrollBarTrackBorderThemeBrush" Color="#59D5D5D5" />
     <StaticResource x:Key="ScrollBarThumbBackgroundColor" ResourceKey="SystemBaseLowColor" />
     <StaticResource x:Key="ScrollBarPanningThumbBackgroundColor" ResourceKey="SystemChromeDisabledLowColor" />
-    <x:String x:Key="ScrollBarExpandDuration">00:00:00.1</x:String>
-    <x:String x:Key="ScrollBarContractDelay">00:00:02</x:String>
-    <x:String x:Key="ScrollBarContractDuration">00:00:00.1</x:String>
-    <x:String x:Key="ScrollBarContractFinalKeyframe">00:00:02.1</x:String>
+    <SolidColorBrush x:Key="ScrollBarPanningThumbBackground" Color="{StaticResource ScrollBarPanningThumbBackgroundColor}" />
     <x:Double x:Key="ScrollBarSize">16</x:Double>
     <x:Double x:Key="ScrollBarButtonArrowIconFontSize">8</x:Double>
-    <x:String x:Key="ScrollBarExpandBeginTime">00:00:00.40</x:String>
-    <x:String x:Key="ScrollBarContractBeginTime">00:00:02.00</x:String>
+     
     <!-- Resources for TreeViewItem.xaml -->
     <StaticResource x:Key="TreeViewItemBackground" ResourceKey="SystemControlTransparentRevealBackgroundBrush" />
     <StaticResource x:Key="TreeViewItemBackgroundPointerOver" ResourceKey="SystemControlHighlightListLowRevealBackgroundBrush" />
@@ -794,11 +547,9 @@
     <StaticResource x:Key="TreeViewItemBorderBrushSelectedPointerOver" ResourceKey="SystemControlBackgroundTransparentRevealBorderBrush" />
     <StaticResource x:Key="TreeViewItemBorderBrushSelectedPressed" ResourceKey="SystemControlBackgroundTransparentRevealBorderBrush" />
     <StaticResource x:Key="TreeViewItemBorderBrushSelectedDisabled" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TreeViewItemCheckBoxBackgroundSelected" ResourceKey="SystemControlTransparentBrush" />
-    <StaticResource x:Key="TreeViewItemCheckBoxBorderSelected" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
-    <StaticResource x:Key="TreeViewItemCheckGlyphSelected" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
     <Thickness x:Key="TreeViewItemBorderThemeThickness">1</Thickness>
     <x:Double x:Key="TreeViewItemMinHeight">32</x:Double>
+
     <!-- Resources for SplitView.xaml -->
     <StaticResource x:Key="SplitViewLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
   
@@ -810,7 +561,9 @@
 
     <!-- Resources for FlyoutPresenter.xaml -->
     <StaticResource x:Key="FlyoutPresenterBackground" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
-    <StaticResource x:Key="FlyoutBorderThemeBrush" ResourceKey="SystemControlForegroundChromeHighBrush" />
+    <StaticResource x:Key="FlyoutBorderThemeBrush" ResourceKey="SystemControlTransientBorderBrush" />
     
+    <!-- Resources for ScrollViewer.xaml -->
+    <SolidColorBrush x:Key="ScrollViewerScrollBarsSeparatorBackground" Color="{StaticResource SystemChromeMediumColor}" Opacity="0.9" />
   </Style.Resources>
 </Style>

+ 7 - 1
src/Avalonia.Themes.Fluent/Controls/ContextMenu.xaml

@@ -1,4 +1,5 @@
 <Style xmlns="https://github.com/avaloniaui"
+       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Selector="ContextMenu">
   <Design.PreviewWith>
     <Border Background="{DynamicResource SystemAccentColor}"
@@ -30,6 +31,11 @@
     </Border>
   </Design.PreviewWith>
 
+  <Style.Resources>
+    <!-- Added missing resource -->
+    <Thickness x:Key="MenuFlyoutScrollerMargin">0,4,0,4</Thickness>
+  </Style.Resources>
+
   <Setter Property="Background" Value="{DynamicResource MenuFlyoutPresenterBackground}" />
   <Setter Property="BorderBrush" Value="{DynamicResource MenuFlyoutPresenterBorderBrush}" />
   <Setter Property="BorderThickness" Value="{DynamicResource MenuFlyoutPresenterBorderThemeThickness}" />
@@ -37,7 +43,7 @@
   <Setter Property="MinHeight" Value="{DynamicResource MenuFlyoutThemeMinHeight}" />
   <Setter Property="Padding" Value="{DynamicResource MenuFlyoutPresenterThemePadding}" />
   <Setter Property="HorizontalAlignment" Value="Stretch" />
-  <Setter Property="TextBlock.FontSize" Value="{DynamicResource ContentControlFontSize}" />
+  <Setter Property="TextBlock.FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
   <Setter Property="TextBlock.FontWeight" Value="Normal" />
   <Setter Property="WindowManagerAddShadowHint" Value="False" />
   <Setter Property="Template">

+ 6 - 8
src/Avalonia.Themes.Fluent/Controls/DataValidationErrors.xaml

@@ -27,14 +27,12 @@
   <Style Selector="DataValidationErrors">
     <Style.Resources>
       <DataTemplate x:Key="InlineDataValidationErrorTemplate">
-        <ItemsControl Items="{Binding}">
-          <ItemsControl.ItemTemplate>
-            <DataTemplate>
-              <TextBlock Foreground="{DynamicResource SystemControlErrorTextForegroundBrush}"
-                         Text="{Binding}"
-                         TextWrapping="Wrap" />
-            </DataTemplate>
-          </ItemsControl.ItemTemplate>
+        <ItemsControl Items="{Binding}" TextBlock.Foreground="{DynamicResource SystemControlErrorTextForegroundBrush}">
+          <ItemsControl.Styles>
+            <Style Selector="TextBlock">
+              <Setter Property="TextWrapping" Value="Wrap" />
+            </Style>
+          </ItemsControl.Styles>
         </ItemsControl>
       </DataTemplate>
       <ControlTemplate x:Key="InlineDataValidationContentTemplate" TargetType="DataValidationErrors">

+ 1 - 1
src/Avalonia.Themes.Fluent/Controls/EmbeddableControlRoot.xaml

@@ -1,6 +1,6 @@
 <Style xmlns="https://github.com/avaloniaui" Selector="EmbeddableControlRoot">
   <Setter Property="Background" Value="{DynamicResource SystemControlBackgroundAltHighBrush}"/>
-  <Setter Property="FontSize" Value="{DynamicResource ContentControlFontSize}"/>
+  <Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}"/>
   <Setter Property="Template">
     <ControlTemplate>
       <Panel>

+ 204 - 113
src/Avalonia.Themes.Fluent/Controls/Expander.xaml

@@ -1,141 +1,232 @@
-<Styles xmlns="https://github.com/avaloniaui">
+<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+  <Design.PreviewWith>
+    <Border Padding="20">
+      <StackPanel Orientation="Vertical" Spacing="20">
+        <Expander ExpandDirection="Up" Header="Expand Up">
+          <StackPanel>
+            <TextBlock>Expanded content</TextBlock>
+          </StackPanel>
+        </Expander>
+        <Expander ExpandDirection="Down" Header="Expand Down">
+          <StackPanel>
+            <TextBlock>Expanded content</TextBlock>
+          </StackPanel>
+        </Expander>
+        <Expander ExpandDirection="Left" Header="Expand Left">
+          <StackPanel>
+            <TextBlock>Expanded content</TextBlock>
+          </StackPanel>
+        </Expander>
+        <Expander ExpandDirection="Right" Header="Expand Right">
+          <StackPanel>
+            <TextBlock>Expanded content</TextBlock>
+          </StackPanel>
+        </Expander>
+      </StackPanel>
+    </Border>
+  </Design.PreviewWith>
 
+  <Styles.Resources>
+    <Thickness x:Key="ExpanderHeaderPadding">16</Thickness>
+    <Thickness x:Key="ExpanderContentPadding">16</Thickness>
+
+    <Thickness x:Key="ExpanderBorderThickness">1</Thickness>
+
+    <Thickness x:Key="ExpanderDropdownLeftBorderThickness">1,1,0,1</Thickness>
+    <Thickness x:Key="ExpanderDropdownUpBorderThickness">1,1,1,0</Thickness>
+    <Thickness x:Key="ExpanderDropdownRightBorderThickness">0,1,1,1</Thickness>
+    <Thickness x:Key="ExpanderDropdownDownBorderThickness">1,0,1,1</Thickness>
+
+    <SolidColorBrush x:Key="ExpanderBackground" Color="{DynamicResource SystemAltMediumHighColor}" />
+    <SolidColorBrush x:Key="ExpanderBorderBrush" Color="{DynamicResource SystemBaseLowColor}" />
+
+    <SolidColorBrush x:Key="ExpanderDropDownBackground" Color="{DynamicResource SystemChromeMediumLowColor}" />
+    <SolidColorBrush x:Key="ExpanderDropDownBorderBrush" Color="{DynamicResource SystemBaseLowColor}" />
+
+    <SolidColorBrush x:Key="ExpanderForeground" Color="{DynamicResource SystemBaseHighColor}" />
+
+    <SolidColorBrush x:Key="ExpanderChevronForeground" Color="{DynamicResource SystemBaseHighColor}" />
+  </Styles.Resources>
   <Style Selector="Expander">
-    <Setter Property="ContentTransition">
-      <Setter.Value>
-        <CrossFade Duration="00:00:00.25" />
-      </Setter.Value>
-    </Setter>
+    <Setter Property="Background" Value="{DynamicResource ExpanderBackground}" />
+    <Setter Property="BorderThickness" Value="{DynamicResource ExpanderBorderThickness}" />
+    <Setter Property="BorderBrush" Value="{DynamicResource ExpanderBorderBrush}" />
+    <Setter Property="Padding" Value="{DynamicResource ExpanderHeaderPadding}" />
+    <Setter Property="HorizontalAlignment" Value="Stretch" />
+    <Setter Property="HorizontalContentAlignment" Value="Left" />
+    <Setter Property="VerticalContentAlignment" Value="Center" />
   </Style>
-  <Style Selector="Expander[ExpandDirection=Down]">
-    <Setter Property="Template">
-      <ControlTemplate>
-        <Border Background="{TemplateBinding Background}">
-          <Grid RowDefinitions="Auto,*">
-            <ToggleButton Name="PART_toggle" Grid.Row="0"  Content="{TemplateBinding Header}" IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}" />
-            <ContentPresenter Name="PART_ContentPresenter"
-                              Grid.Row="1"
-                              IsVisible="{TemplateBinding IsExpanded}"
-                              ContentTemplate="{TemplateBinding ContentTemplate}"
-                              Content="{TemplateBinding Content}"
-                              HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
-                              VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
-                              Padding="{TemplateBinding Padding}" />
-          </Grid>
-        </Border>
-      </ControlTemplate>
-    </Setter>
-  </Style>
-  <Style Selector="Expander[IsExpanded=true] /template/ ToggleButton#PART_toggle /template/ ContentPresenter#PART_ContentPresenter">
-    <Setter Property="TextBlock.Foreground" Value="{DynamicResource ToggleButtonForeground}"/>
-  </Style>
-  <Style Selector="Expander[ExpandDirection=Up]">
+  <Style Selector="Expander">
     <Setter Property="Template">
       <ControlTemplate>
-        <Border Background="{TemplateBinding Background}">
-          <Grid RowDefinitions="*,Auto">
-            <ToggleButton Name="PART_toggle" Grid.Row="1"  Content="{TemplateBinding Header}" IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}" />
-            <ContentPresenter Name="PART_ContentPresenter"
-                              Grid.Row="0"
-                              IsVisible="{TemplateBinding IsExpanded}"
-                              ContentTemplate="{TemplateBinding ContentTemplate}"
-                              Content="{TemplateBinding Content}"
+        <DockPanel>
+          <ToggleButton x:Name="ExpanderHeader"
+                        Padding="{TemplateBinding Padding}"
+                        HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        Content="{TemplateBinding Header}"
+                        ContentTemplate="{TemplateBinding HeaderTemplate}"
+                        IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
+                        IsEnabled="{TemplateBinding IsEnabled}" />
+          <Border x:Name="ExpanderContent"
+                  Padding="{DynamicResource ExpanderContentPadding}"
+                  Background="{DynamicResource ExpanderDropDownBackground}"
+                  BorderBrush="{DynamicResource ExpanderDropDownBorderBrush}"
+                  IsVisible="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
+            <ContentPresenter x:Name="PART_ContentPresenter"
                               HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                               VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
-                              Padding="{TemplateBinding Padding}" />
-          </Grid>
-        </Border>
-      </ControlTemplate>
-    </Setter>
-  </Style>
-  <Style Selector="Expander[ExpandDirection=Right]">
-    <Setter Property="Template">
-      <ControlTemplate>
-        <Border Background="{TemplateBinding Background}">
-          <Grid ColumnDefinitions="Auto,*">
-            <ToggleButton Name="PART_toggle" Grid.Column="0"  Content="{TemplateBinding Header}" IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}" />
-            <ContentPresenter Name="PART_ContentPresenter"
-                              Grid.Column="1"
-                              IsVisible="{TemplateBinding IsExpanded}"
-                              ContentTemplate="{TemplateBinding ContentTemplate}"
                               Content="{TemplateBinding Content}"
-                              HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
-                              VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
-                              Padding="{TemplateBinding Padding}" />
-          </Grid>
-        </Border>
+                              ContentTemplate="{TemplateBinding ContentTemplate}" />
+          </Border>
+        </DockPanel>
       </ControlTemplate>
     </Setter>
   </Style>
-  <Style Selector="Expander[ExpandDirection=Left]">
+
+  <Style Selector="Expander /template/ ToggleButton#ExpanderHeader">
+    <Setter Property="HorizontalContentAlignment" Value="Left" />
     <Setter Property="Template">
       <ControlTemplate>
-        <Border Background="{TemplateBinding Background}">
+        <Border x:Name="ToggleButtonBackground">
           <Grid ColumnDefinitions="*,Auto">
-            <ToggleButton Name="PART_toggle" Grid.Column="1"  Content="{TemplateBinding Header}" IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}" />
-            <ContentPresenter Name="PART_ContentPresenter"
-                              Grid.Column="0"
-                              IsVisible="{TemplateBinding IsExpanded}"
-                              ContentTemplate="{TemplateBinding ContentTemplate}"
-                              Content="{TemplateBinding Content}"
+            <ContentPresenter x:Name="PART_ContentPresenter"
+                              Margin="{TemplateBinding Padding}"
                               HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
-                              VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
-                              Padding="{TemplateBinding Padding}" />
-          </Grid>
-        </Border>
-      </ControlTemplate>
-    </Setter>
-  </Style>
-  <Style Selector="Expander /template/ ToggleButton#PART_toggle">
-    <Setter Property="Template">
-      <ControlTemplate>
-        <Border BorderThickness="1" Background="Transparent">
-          <Grid ColumnDefinitions="Auto,Auto">
-            <Border Grid.Column="0" Width="20" Height="20" HorizontalAlignment="Center" VerticalAlignment="Center">
-              <Path Fill="{DynamicResource SystemControlForegroundBaseHighBrush}"
-                      HorizontalAlignment="Center"
-                      VerticalAlignment="Center"
-                      Data="M 0 2 L 4 6 L 0 10 Z" />
+                              VerticalContentAlignment="Center"
+                              Background="Transparent"
+                              BorderBrush="Transparent"
+                              BorderThickness="0"
+                              Content="{TemplateBinding Content}"
+                              ContentTemplate="{TemplateBinding ContentTemplate}"
+                              TextBlock.Foreground="{DynamicResource ExpanderForeground}" />
+            <Border x:Name="ExpandCollapseChevronBorder"
+                    Grid.Column="1"
+                    Width="32"
+                    Height="32"
+                    Margin="7"
+                    RenderTransformOrigin="50%,50%">
+              <Path x:Name="ExpandCollapseChevron"
+                    HorizontalAlignment="Center"
+                    VerticalAlignment="Center"
+                    RenderTransformOrigin="50%,50%"
+                    Stretch="None"
+                    Stroke="{DynamicResource ExpanderChevronForeground}"
+                    StrokeThickness="1" />
+              <Border.RenderTransform>
+                <RotateTransform />
+              </Border.RenderTransform>
             </Border>
-            <ContentPresenter Name="PART_ContentPresenter"
-                              Grid.Column="1" 
-                              Background="Transparent" 
-                              Content="{TemplateBinding Content}" 
-                              VerticalAlignment="Center" 
-                              HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
-                              VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
-                              Padding="{TemplateBinding Padding}"/>
           </Grid>
         </Border>
       </ControlTemplate>
     </Setter>
   </Style>
-  <Style Selector="Expander /template/ ToggleButton#PART_toggle:pointerover /template/ Border">
-    <Setter Property="BorderBrush" Value="{DynamicResource SystemControlHighlightBaseMediumBrush}" />
+  <Style Selector="Expander /template/ ToggleButton#ExpanderHeader:pressed">
+    <Setter Property="RenderTransform" Value="{x:Null}" />
   </Style>
-  <Style Selector="Expander:down:expanded /template/ ToggleButton#PART_toggle /template/ Path">
-    <Setter Property="RenderTransform">
-      <RotateTransform Angle="90" />
-    </Setter>
+
+  <Style Selector="Expander:left /template/ ToggleButton#ExpanderHeader, Expander:right /template/ ToggleButton#ExpanderHeader">
+    <Setter Property="VerticalAlignment" Value="Stretch" />
   </Style>
-  <Style Selector="Expander:up:expanded /template/ ToggleButton#PART_toggle /template/ Path">
-    <Setter Property="RenderTransform">
-      <RotateTransform Angle="-90" />
-    </Setter>
+
+
+  <Style Selector="Expander /template/ ToggleButton#ExpanderHeader /template/ Border#ToggleButtonBackground">
+    <Setter Property="Background" Value="{TemplateBinding Background}" />
+    <Setter Property="BorderBrush" Value="{TemplateBinding BorderBrush}" />
+    <Setter Property="BorderThickness" Value="{TemplateBinding BorderThickness}" />
   </Style>
-  <Style Selector="Expander:left:expanded /template/ ToggleButton#PART_toggle /template/ Path">
-    <Setter Property="RenderTransform">
-      <RotateTransform Angle="180" />
-    </Setter>
+
+  <Style Selector="Expander:not(:expanded) /template/ ToggleButton#ExpanderHeader /template/ Border#ToggleButtonBackground">
+    <Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
   </Style>
-  <Style Selector="Expander:right /template/ ToggleButton#PART_toggle /template/ Path">
-    <Setter Property="RenderTransform">
-      <RotateTransform Angle="180" />
-    </Setter>
+  <Style Selector="Expander:expanded:up /template/ ToggleButton#ExpanderHeader /template/ Border#ToggleButtonBackground">
+    <Setter Property="CornerRadius" Value="{Binding Source={StaticResource ControlCornerRadius}, Converter={StaticResource BottomCornerRadiusFilterConverter}}" />
   </Style>
-  <Style Selector="Expander:right:expanded /template/ ToggleButton#PART_toggle /template/ Path">
-    <Setter Property="RenderTransform">
-      <RotateTransform Angle="0" />
-    </Setter>
+  <Style Selector="Expander:expanded:up /template/ Border#ExpanderContent">
+    <Setter Property="CornerRadius" Value="{Binding Source={StaticResource ControlCornerRadius}, Converter={StaticResource TopCornerRadiusFilterConverter}}" />
+  </Style>
+  <Style Selector="Expander:expanded:down /template/ ToggleButton#ExpanderHeader /template/ Border#ToggleButtonBackground">
+    <Setter Property="CornerRadius" Value="{Binding Source={StaticResource ControlCornerRadius}, Converter={StaticResource TopCornerRadiusFilterConverter}}" />
+  </Style>
+  <Style Selector="Expander:expanded:down /template/ Border#ExpanderContent">
+    <Setter Property="CornerRadius" Value="{Binding Source={StaticResource ControlCornerRadius}, Converter={StaticResource BottomCornerRadiusFilterConverter}}" />
+  </Style>
+  <Style Selector="Expander:expanded:left /template/ ToggleButton#ExpanderHeader /template/ Border#ToggleButtonBackground">
+    <Setter Property="CornerRadius" Value="{Binding Source={StaticResource ControlCornerRadius}, Converter={StaticResource RightCornerRadiusFilterConverter}}" />
+  </Style>
+  <Style Selector="Expander:expanded:left /template/ Border#ExpanderContent">
+    <Setter Property="CornerRadius" Value="{Binding Source={StaticResource ControlCornerRadius}, Converter={StaticResource LeftCornerRadiusFilterConverter}}" />
+  </Style>
+  <Style Selector="Expander:expanded:right /template/ ToggleButton#ExpanderHeader /template/ Border#ToggleButtonBackground">
+    <Setter Property="CornerRadius" Value="{Binding Source={StaticResource ControlCornerRadius}, Converter={StaticResource LeftCornerRadiusFilterConverter}}" />
+  </Style>
+  <Style Selector="Expander:expanded:right /template/ Border#ExpanderContent">
+    <Setter Property="CornerRadius" Value="{Binding Source={StaticResource ControlCornerRadius}, Converter={StaticResource RightCornerRadiusFilterConverter}}" />
+  </Style>
+
+  <Style Selector="Expander:left /template/ ToggleButton#ExpanderHeader">
+    <Setter Property="DockPanel.Dock" Value="Right" />
+  </Style>
+  <Style Selector="Expander:up /template/ ToggleButton#ExpanderHeader">
+    <Setter Property="DockPanel.Dock" Value="Bottom" />
+  </Style>
+  <Style Selector="Expander:right /template/ ToggleButton#ExpanderHeader">
+    <Setter Property="DockPanel.Dock" Value="Left" />
+  </Style>
+  <Style Selector="Expander:down /template/ ToggleButton#ExpanderHeader">
+    <Setter Property="DockPanel.Dock" Value="Top" />
+  </Style>
+
+
+  <Style Selector="Expander:expanded /template/ ToggleButton#ExpanderHeader /template/ Border#ExpandCollapseChevronBorder">
+    <Style.Animations>
+      <Animation FillMode="Both" Duration="0:0:0.0625">
+        <KeyFrame Cue="100%">
+          <Setter Property="RotateTransform.Angle" Value="180" />
+        </KeyFrame>
+      </Animation>
+    </Style.Animations>
+  </Style>
+  <Style Selector="Expander:not(:expanded) /template/ ToggleButton#ExpanderHeader /template/ Border#ExpandCollapseChevronBorder">
+    <Style.Animations>
+      <Animation FillMode="Both" Duration="0:0:0.0625">
+        <KeyFrame Cue="0%">
+          <Setter Property="RotateTransform.Angle" Value="180" />
+        </KeyFrame>
+        <KeyFrame Cue="100%">
+          <Setter Property="RotateTransform.Angle" Value="0" />
+        </KeyFrame>
+      </Animation>
+    </Style.Animations>
+  </Style>
+
+  <Style Selector="Expander:left /template/ ToggleButton#ExpanderHeader /template/ Path#ExpandCollapseChevron">
+    <Setter Property="Data" Value="M 7 0 L 0 7 L 7 14" />
+  </Style>
+  <Style Selector="Expander:up /template/ ToggleButton#ExpanderHeader /template/ Path#ExpandCollapseChevron">
+    <Setter Property="Data" Value="M 0 7 L 7 0 L 14 7" />
+  </Style>
+  <Style Selector="Expander:right /template/ ToggleButton#ExpanderHeader /template/ Path#ExpandCollapseChevron">
+    <Setter Property="Data" Value="M 0 0 L 7 7 L 0 14" />
+  </Style>
+  <Style Selector="Expander:down /template/ ToggleButton#ExpanderHeader /template/ Path#ExpandCollapseChevron">
+    <Setter Property="Data" Value="M 0 0 L 7 7 L 14 0" />
+  </Style>
+
+
+  <Style Selector="Expander:left /template/ Border#ExpanderContent">
+    <Setter Property="BorderThickness" Value="{DynamicResource ExpanderDropdownLeftBorderThickness}" />
+  </Style>
+  <Style Selector="Expander:up /template/ Border#ExpanderContent">
+    <Setter Property="BorderThickness" Value="{DynamicResource ExpanderDropdownUpBorderThickness}" />
+  </Style>
+  <Style Selector="Expander:right /template/ Border#ExpanderContent">
+    <Setter Property="BorderThickness" Value="{DynamicResource ExpanderDropdownRightBorderThickness}" />
+  </Style>
+  <Style Selector="Expander:down /template/ Border#ExpanderContent">
+    <Setter Property="BorderThickness" Value="{DynamicResource ExpanderDropdownDownBorderThickness}" />
   </Style>
 </Styles>

+ 0 - 1
src/Avalonia.Themes.Fluent/Controls/FlyoutPresenter.xaml

@@ -1,7 +1,6 @@
 <Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
   <Styles.Resources>
     <Thickness x:Key="FlyoutBorderThemeThickness">1</Thickness>
-    <Thickness x:Key="FlyoutBorderThemePadding">0</Thickness>
   </Styles.Resources>
   
   <Style Selector="FlyoutPresenter">

+ 0 - 1
src/Avalonia.Themes.Fluent/Controls/Menu.xaml

@@ -12,7 +12,6 @@
 
   <Style.Resources>
     <x:Double x:Key="MenuBarHeight">32</x:Double>
-    <Thickness x:Key="MenuBarItemPadding">12,0,12,0</Thickness>
   </Style.Resources>
 
   <Setter Property="Background" Value="Transparent" />

+ 1 - 2
src/Avalonia.Themes.Fluent/Controls/MenuItem.xaml

@@ -43,8 +43,7 @@
 
   <Styles.Resources>
     <conv:PlatformKeyGestureConverter x:Key="KeyGestureConverter" />
-    <x:Double x:Key="MenuFlyoutSubItemPopupHorizontalOffset">-4</x:Double>
-    <Thickness x:Key="MenuFlyoutScrollerMargin">0,4,0,4</Thickness>
+    <x:Double x:Key="MenuFlyoutSubItemPopupHorizontalOffset">-4</x:Double>    
     <Thickness x:Key="MenuIconPresenterMargin">0,0,12,0</Thickness>
     <Thickness x:Key="MenuInputGestureTextMargin">24,0,0,0</Thickness>
     <StreamGeometry x:Key="MenuItemChevronPathData">M 1,0 10,10 l -9,10 -1,-1 L 8,10 -0,1 Z</StreamGeometry>

+ 1 - 1
src/Avalonia.Themes.Fluent/Controls/Window.xaml

@@ -2,7 +2,7 @@
   <Setter Property="Background" Value="{DynamicResource SystemControlBackgroundAltHighBrush}"/>  
   <Setter Property="TransparencyBackgroundFallback" Value="{DynamicResource SystemControlBackgroundAltHighBrush}" />
   <Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}"/>
-  <Setter Property="FontSize" Value="{DynamicResource ContentControlFontSize}"/>  
+  <Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}"/>  
   <Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
   <Setter Property="Template">
     <ControlTemplate>

+ 2 - 2
src/Avalonia.Themes.Fluent/FluentDark.xaml

@@ -1,9 +1,9 @@
 <Styles xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-       xmlns:sys="clr-namespace:System;assembly=netstandard">  
+       xmlns:sys="clr-namespace:System;assembly=netstandard">
+  <StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/AccentColors.xaml" />
   <StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/BaseDark.xaml" />
   <StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/Base.xaml" />
-  <StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/FluentBaseDark.xaml" />
   <StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml" />
   <StyleInclude Source="avares://Avalonia.Themes.Fluent/Controls/FluentControls.xaml" />
 </Styles>

+ 1 - 1
src/Avalonia.Themes.Fluent/FluentLight.xaml

@@ -1,9 +1,9 @@
 <Styles xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sys="clr-namespace:System;assembly=netstandard">
+  <StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/AccentColors.xaml" />
   <StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/BaseLight.xaml" />
   <StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/Base.xaml" />  
-  <StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/FluentBaseLight.xaml" />
   <StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml" />
   <StyleInclude Source="avares://Avalonia.Themes.Fluent/Controls/FluentControls.xaml" />
 </Styles>

+ 69 - 0
src/Avalonia.Visuals/Animation/Animators/BaseBrushAnimator.cs

@@ -0,0 +1,69 @@
+using System;
+using System.Collections.Generic;
+using System.Reactive.Disposables;
+using Avalonia.Logging;
+using Avalonia.Media;
+
+namespace Avalonia.Animation.Animators
+{
+    /// <summary>
+    /// Animator that handles all animations on properties
+    /// with <see cref="IBrush"/> as their type and
+    /// redirect them to the properly registered
+    /// animators in this class.
+    /// </summary>
+    public class BaseBrushAnimator : Animator<IBrush>
+    {
+        private IAnimator _targetAnimator;
+
+        private static readonly List<(Func<Type, bool> Match, Type AnimatorType)> _brushAnimators =
+            new List<(Func<Type, bool> Match, Type AnimatorType)>();
+
+        /// <summary>
+        /// Register an <see cref="Animator{T}"/> that handles a specific
+        /// <see cref="IBrush"/>'s descendant value type.
+        /// </summary>
+        /// <param name="condition">
+        /// The condition to which the <see cref="Animator{T}"/>
+        /// is to be activated and used.
+        /// </param>
+        /// <typeparam name="TAnimator">
+        /// The type of the animator to instantiate.
+        /// </typeparam>
+        public static void RegisterBrushAnimator<TAnimator>(Func<Type, bool> condition)
+            where TAnimator : IAnimator
+        {
+            _brushAnimators.Insert(0, (condition, typeof(TAnimator)));
+        }
+
+        /// <inheritdoc/>
+        public override IDisposable Apply(Animation animation, Animatable control, IClock clock,
+            IObservable<bool> match, Action onComplete)
+        {
+            foreach (var valueType in _brushAnimators)
+            {
+                if (!valueType.Match(this[0].Value.GetType())) continue;
+
+                _targetAnimator = (IAnimator)Activator.CreateInstance(valueType.AnimatorType);
+
+                foreach (var keyframe in this)
+                {
+                    _targetAnimator.Add(keyframe);
+                }
+
+                _targetAnimator.Property = this.Property;
+                
+               return _targetAnimator.Apply(animation, control, clock, match, onComplete);
+            }
+
+            Logger.TryGet(LogEventLevel.Error, LogArea.Animations)?.Log(
+                this,
+                "The animation's keyframe values didn't match any brush animators registered in BaseBrushAnimator.");
+            
+            return Disposable.Empty;
+        }
+
+        /// <inheritdoc/>
+        public override IBrush Interpolate(double progress, IBrush oldValue, IBrush newValue) => null;
+    }
+}

+ 6 - 1
src/Avalonia.Visuals/Animation/Animators/ColorAnimator.cs

@@ -31,6 +31,11 @@ namespace Avalonia.Animation.Animators
         }
 
         public override Color Interpolate(double progress, Color oldValue, Color newValue)
+        {
+            return InterpolateCore(progress, oldValue, newValue);
+        }
+
+        internal static Color InterpolateCore(double progress, Color oldValue, Color newValue)
         {
             // normalize sRGB values.
             var oldA = oldValue.A / 255d;
@@ -59,7 +64,7 @@ namespace Avalonia.Animation.Animators
             var b = oldB + progress * (newB - oldB);
 
             // convert back to sRGB in the [0..255] range
-            a = a * 255d;
+            a *= 255d;
             r = OECF_sRGB(r) * 255d;
             g = OECF_sRGB(g) * 255d;
             b = OECF_sRGB(b) * 255d;

+ 20 - 49
src/Avalonia.Visuals/Animation/Animators/SolidColorBrushAnimator.cs

@@ -1,71 +1,42 @@
 using System;
-using System.Reactive.Disposables;
+using Avalonia.Data;
 using Avalonia.Media;
 using Avalonia.Media.Immutable;
 
 namespace Avalonia.Animation.Animators
 {
     /// <summary>
-    /// Animator that handles <see cref="SolidColorBrush"/>. 
+    /// Animator that handles <see cref="SolidColorBrush"/> values. 
     /// </summary>
-    public class SolidColorBrushAnimator : Animator<SolidColorBrush>
+    public class ISolidColorBrushAnimator : Animator<ISolidColorBrush>
     {
-        private ColorAnimator _colorAnimator;
-
-        private void InitializeColorAnimator()
+        public override ISolidColorBrush Interpolate(double progress, ISolidColorBrush oldValue, ISolidColorBrush newValue)
         {
-            _colorAnimator = new ColorAnimator();
-
-            foreach (AnimatorKeyFrame keyframe in this)
+            if (oldValue is null || newValue is null)
             {
-                _colorAnimator.Add(keyframe);
+                return oldValue;
             }
 
-            _colorAnimator.Property = SolidColorBrush.ColorProperty;
+            return new ImmutableSolidColorBrush(ColorAnimator.InterpolateCore(progress, oldValue.Color, newValue.Color));
         }
 
-        public override IDisposable Apply(Animation animation, Animatable control, IClock clock, IObservable<bool> match, Action onComplete)
+        public override IDisposable BindAnimation(Animatable control, IObservable<ISolidColorBrush> instance)
         {
-            // Preprocess keyframe values to Color if the xaml parser converts them to ISCB.
-            foreach (var keyframe in this)
-            {
-                if (keyframe.Value is ISolidColorBrush colorBrush)
-                {
-                    keyframe.Value = colorBrush.Color;
-                }
-                else
-                {
-                    return Disposable.Empty;
-                }
-            }
-
-            SolidColorBrush finalTarget;
-            var targetVal = control.GetValue(Property);
-            if (targetVal is null)
-            {
-                finalTarget = new SolidColorBrush(Colors.Transparent);
-                control.SetValue(Property, finalTarget);
-            }
-            else if (targetVal is ImmutableSolidColorBrush immutableSolidColorBrush)
-            {
-                finalTarget = new SolidColorBrush(immutableSolidColorBrush.Color);
-                control.SetValue(Property, finalTarget);
-            }
-            else if (targetVal is ISolidColorBrush)
-            {
-                finalTarget = targetVal as SolidColorBrush;
-            }
-            else
+            return control.Bind((AvaloniaProperty<IBrush>)Property, instance, BindingPriority.Animation);
+        }
+    }
+    
+    [Obsolete]    
+    public class SolidColorBrushAnimator : Animator<SolidColorBrush>
+    {    
+        public override SolidColorBrush Interpolate(double progress, SolidColorBrush oldValue, SolidColorBrush newValue)
+        {
+            if (oldValue is null || newValue is null)
             {
-                return Disposable.Empty;
+                return oldValue;
             }
 
-            if (_colorAnimator == null)
-                InitializeColorAnimator();
-
-            return _colorAnimator.Apply(animation, finalTarget, clock ?? control.Clock, match, onComplete);
+            return new SolidColorBrush(ColorAnimator.InterpolateCore(progress, oldValue.Color, newValue.Color));
         }
-
-        public override SolidColorBrush Interpolate(double p, SolidColorBrush o, SolidColorBrush n) => null;
     }
 }

+ 23 - 0
src/Avalonia.Visuals/Animation/Transitions/BoxShadowsTransition.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Reactive.Linq;
+
+using Avalonia.Animation.Animators;
+using Avalonia.Media;
+
+namespace Avalonia.Animation
+{
+    /// <summary>
+    /// Transition class that handles <see cref="AvaloniaProperty"/> with <see cref="BoxShadows"/> type.
+    /// </summary>  
+    public class BoxShadowsTransition : Transition<BoxShadows>
+    {
+        private static readonly BoxShadowsAnimator s_animator = new BoxShadowsAnimator();
+
+        /// <inheritdocs/>
+        public override IObservable<BoxShadows> DoTransition(IObservable<double> progress, BoxShadows oldValue, BoxShadows newValue)
+        {
+            return progress
+                .Select(progress => s_animator.Interpolate(Easing.Ease(progress), oldValue, newValue));
+        }
+    }
+}

+ 5 - 16
src/Avalonia.Visuals/Animation/Transitions/CornerRadiusTransition.cs

@@ -1,6 +1,8 @@
 using System;
 using System.Reactive.Linq;
 
+using Avalonia.Animation.Animators;
+
 namespace Avalonia.Animation
 {
     /// <summary>
@@ -8,26 +10,13 @@ namespace Avalonia.Animation
     /// </summary>  
     public class CornerRadiusTransition : Transition<CornerRadius>
     {
+        private static readonly CornerRadiusAnimator s_animator = new CornerRadiusAnimator();
+
         /// <inheritdocs/>
         public override IObservable<CornerRadius> DoTransition(IObservable<double> progress, CornerRadius oldValue, CornerRadius newValue)
         {
             return progress
-                .Select(p =>
-                {
-                    var f = Easing.Ease(p);
-
-                    var deltaTL = newValue.TopLeft - oldValue.TopLeft;
-                    var deltaTR = newValue.TopRight - oldValue.TopRight;
-                    var deltaBR = newValue.BottomRight - oldValue.BottomRight;
-                    var deltaBL = newValue.BottomLeft - oldValue.BottomLeft;
-
-                    var nTL = f * deltaTL + oldValue.TopLeft;
-                    var nTR = f * deltaTR + oldValue.TopRight;
-                    var nBR = f * deltaBR + oldValue.BottomRight;
-                    var nBL = f * deltaBL + oldValue.BottomLeft;
-
-                    return new CornerRadius(nTL, nTR, nBR, nBL);
-                });
+                .Select(progress => s_animator.Interpolate(Easing.Ease(progress), oldValue, newValue));
         }
     }
 }

+ 5 - 5
src/Avalonia.Visuals/Animation/Transitions/PointTransition.cs

@@ -1,6 +1,8 @@
 using System;
 using System.Reactive.Linq;
 
+using Avalonia.Animation.Animators;
+
 namespace Avalonia.Animation
 {
     /// <summary>
@@ -8,15 +10,13 @@ namespace Avalonia.Animation
     /// </summary>  
     public class PointTransition : Transition<Point>
     {
+        private static readonly PointAnimator s_animator = new PointAnimator();
+
         /// <inheritdocs/>
         public override IObservable<Point> DoTransition(IObservable<double> progress, Point oldValue, Point newValue)
         {
             return progress
-                .Select(p =>
-                {
-                    var f = Easing.Ease(p);
-                    return ((newValue - oldValue) * f) + oldValue;
-                });
+                .Select(progress => s_animator.Interpolate(Easing.Ease(progress), oldValue, newValue));
         }
     }
 }

+ 5 - 5
src/Avalonia.Visuals/Animation/Transitions/SizeTransition.cs

@@ -1,6 +1,8 @@
 using System;
 using System.Reactive.Linq;
 
+using Avalonia.Animation.Animators;
+
 namespace Avalonia.Animation
 {
     /// <summary>
@@ -8,15 +10,13 @@ namespace Avalonia.Animation
     /// </summary>  
     public class SizeTransition : Transition<Size>
     {
+        private static readonly SizeAnimator s_animator = new SizeAnimator();
+
         /// <inheritdocs/>
         public override IObservable<Size> DoTransition(IObservable<double> progress, Size oldValue, Size newValue)
         {
             return progress
-                .Select(p =>
-                {
-                    var f = Easing.Ease(p);
-                    return ((newValue - oldValue) * f) + oldValue;
-                });
+                .Select(progress => s_animator.Interpolate(Easing.Ease(progress), oldValue, newValue));
         }
     }
 }

+ 5 - 5
src/Avalonia.Visuals/Animation/Transitions/ThicknessTransition.cs

@@ -1,6 +1,8 @@
 using System;
 using System.Reactive.Linq;
 
+using Avalonia.Animation.Animators;
+
 namespace Avalonia.Animation
 {
     /// <summary>
@@ -8,15 +10,13 @@ namespace Avalonia.Animation
     /// </summary>  
     public class ThicknessTransition : Transition<Thickness>
     {
+        private static readonly ThicknessAnimator s_animator = new ThicknessAnimator();
+
         /// <inheritdocs/>
         public override IObservable<Thickness> DoTransition(IObservable<double> progress, Thickness oldValue, Thickness newValue)
         {
             return progress
-                .Select(p =>
-                {
-                    var f = Easing.Ease(p);
-                    return ((newValue - oldValue) * f) + oldValue;
-                });
+                .Select(progress => s_animator.Interpolate(Easing.Ease(progress), oldValue, newValue));
         }
     }
 }

+ 5 - 5
src/Avalonia.Visuals/Animation/Transitions/VectorTransition.cs

@@ -1,6 +1,8 @@
 using System;
 using System.Reactive.Linq;
 
+using Avalonia.Animation.Animators;
+
 namespace Avalonia.Animation
 {
     /// <summary>
@@ -8,15 +10,13 @@ namespace Avalonia.Animation
     /// </summary>  
     public class VectorTransition : Transition<Vector>
     {
+        private static readonly VectorAnimator s_animator = new VectorAnimator();
+
         /// <inheritdocs/>
         public override IObservable<Vector> DoTransition(IObservable<double> progress, Vector oldValue, Vector newValue)
         {
             return progress
-                .Select(p =>
-                {
-                    var f = Easing.Ease(p);
-                    return ((newValue - oldValue) * f) + oldValue;
-                });
+                .Select(progress => s_animator.Interpolate(Easing.Ease(progress), oldValue, newValue));
         }
     }
 }

+ 5 - 0
src/Avalonia.Visuals/ApiCompatBaseline.txt

@@ -64,3 +64,8 @@ InterfacesShouldHaveSameMembers : Interface member 'public Avalonia.Platform.IGl
 InterfacesShouldHaveSameMembers : Interface member 'public Avalonia.Platform.IGlyphRunImpl Avalonia.Platform.IPlatformRenderInterface.CreateGlyphRun(Avalonia.Media.GlyphRun, System.Double)' is present in the contract but not in the implementation.
 MembersMustExist : Member 'public Avalonia.Platform.IGlyphRunImpl Avalonia.Platform.IPlatformRenderInterface.CreateGlyphRun(Avalonia.Media.GlyphRun, System.Double)' does not exist in the implementation but it does exist in the contract.
 Total Issues: 64
+InterfacesShouldHaveSameMembers : Interface member 'public Avalonia.Platform.IWriteableBitmapImpl Avalonia.Platform.IPlatformRenderInterface.LoadWriteableBitmap(System.IO.Stream)' is present in the implementation but not in the contract.
+InterfacesShouldHaveSameMembers : Interface member 'public Avalonia.Platform.IWriteableBitmapImpl Avalonia.Platform.IPlatformRenderInterface.LoadWriteableBitmap(System.String)' is present in the implementation but not in the contract.
+InterfacesShouldHaveSameMembers : Interface member 'public Avalonia.Platform.IWriteableBitmapImpl Avalonia.Platform.IPlatformRenderInterface.LoadWriteableBitmapToHeight(System.IO.Stream, System.Int32, Avalonia.Visuals.Media.Imaging.BitmapInterpolationMode)' is present in the implementation but not in the contract.
+InterfacesShouldHaveSameMembers : Interface member 'public Avalonia.Platform.IWriteableBitmapImpl Avalonia.Platform.IPlatformRenderInterface.LoadWriteableBitmapToWidth(System.IO.Stream, System.Int32, Avalonia.Visuals.Media.Imaging.BitmapInterpolationMode)' is present in the implementation but not in the contract.
+Total Issues: 11

+ 2 - 0
src/Avalonia.Visuals/Media/Brush.cs

@@ -1,6 +1,7 @@
 using System;
 using System.ComponentModel;
 using Avalonia.Animation;
+using Avalonia.Animation.Animators;
 
 namespace Avalonia.Media
 {
@@ -21,6 +22,7 @@ namespace Avalonia.Media
 
         static Brush()
         {
+            Animation.Animation.RegisterAnimator<BaseBrushAnimator>(prop => typeof(IBrush).IsAssignableFrom(prop.PropertyType));
             AffectsRender<Brush>(OpacityProperty);
         }
 

+ 45 - 0
src/Avalonia.Visuals/Media/Imaging/WriteableBitmap.cs

@@ -1,5 +1,8 @@
 using System;
+using System.IO;
+using System.Threading.Tasks;
 using Avalonia.Platform;
+using Avalonia.Visuals.Media.Imaging;
 
 namespace Avalonia.Media.Imaging
 {
@@ -34,8 +37,50 @@ namespace Avalonia.Media.Imaging
         {
         }
 
+        private WriteableBitmap(IWriteableBitmapImpl impl) : base(impl)
+        {
+            
+        }
+
         public ILockedFramebuffer Lock() => ((IWriteableBitmapImpl) PlatformImpl.Item).Lock();
 
+        public static WriteableBitmap Decode(Stream stream)
+        {
+            var ri = AvaloniaLocator.Current.GetService<IPlatformRenderInterface>();
+
+            return new WriteableBitmap(ri.LoadWriteableBitmap(stream));
+        }
+        
+        /// <summary>
+        /// Loads a WriteableBitmap from a stream and decodes at the desired width. Aspect ratio is maintained.
+        /// This is more efficient than loading and then resizing.
+        /// </summary>
+        /// <param name="stream">The stream to read the bitmap from. This can be any supported image format.</param>
+        /// <param name="width">The desired width of the resulting bitmap.</param>
+        /// <param name="interpolationMode">The <see cref="BitmapInterpolationMode"/> to use should any scaling be required.</param>
+        /// <returns>An instance of the <see cref="WriteableBitmap"/> class.</returns>
+        public new static WriteableBitmap DecodeToWidth(Stream stream, int width, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
+        {
+            var ri = AvaloniaLocator.Current.GetService<IPlatformRenderInterface>();
+
+            return new WriteableBitmap(ri.LoadWriteableBitmapToWidth(stream, width, interpolationMode));
+        }
+
+        /// <summary>
+        /// Loads a Bitmap from a stream and decodes at the desired height. Aspect ratio is maintained.
+        /// This is more efficient than loading and then resizing.
+        /// </summary>
+        /// <param name="stream">The stream to read the bitmap from. This can be any supported image format.</param>
+        /// <param name="height">The desired height of the resulting bitmap.</param>
+        /// <param name="interpolationMode">The <see cref="BitmapInterpolationMode"/> to use should any scaling be required.</param>
+        /// <returns>An instance of the <see cref="WriteableBitmap"/> class.</returns>
+        public new static WriteableBitmap DecodeToHeight(Stream stream, int height, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
+        {
+            var ri = AvaloniaLocator.Current.GetService<IPlatformRenderInterface>();
+
+            return new WriteableBitmap(ri.LoadWriteableBitmapToHeight(stream, height, interpolationMode));
+        }
+
         private static IBitmapImpl CreatePlatformImpl(PixelSize size, in Vector dpi, PixelFormat? format, AlphaFormat? alphaFormat)
         {
             var ri = AvaloniaLocator.Current.GetService<IPlatformRenderInterface>();

+ 1 - 2
src/Avalonia.Visuals/Media/SolidColorBrush.cs

@@ -1,4 +1,3 @@
-using Avalonia.Animation;
 using Avalonia.Animation.Animators;
 using Avalonia.Media.Immutable;
 
@@ -17,7 +16,7 @@ namespace Avalonia.Media
 
         static SolidColorBrush()
         {
-            Animation.Animation.RegisterAnimator<SolidColorBrushAnimator>(prop => typeof(IBrush).IsAssignableFrom(prop.PropertyType));
+            BaseBrushAnimator.RegisterBrushAnimator<ISolidColorBrushAnimator>(match => typeof(ISolidColorBrush).IsAssignableFrom(match));
             AffectsRender<SolidColorBrush>(ColorProperty);
         }
 

+ 1 - 1
src/Avalonia.Visuals/Media/TextFormatting/TextFormatterImpl.cs

@@ -422,7 +422,7 @@ namespace Avalonia.Media.TextFormatting
                             }
                             else
                             {
-                                currentPosition = currentLength + lineBreaker.Current.PositionWrap;
+                                currentPosition = currentLength + measuredLength;
                             }
 
                             breakFound = true;

+ 32 - 0
src/Avalonia.Visuals/Platform/IPlatformRenderInterface.cs

@@ -100,6 +100,38 @@ namespace Avalonia.Platform
         /// <returns>An <see cref="IBitmapImpl"/>.</returns>
         IBitmapImpl LoadBitmap(Stream stream);
 
+        /// <summary>
+        /// Loads a WriteableBitmap implementation from a stream to a specified width maintaining aspect ratio.
+        /// </summary>
+        /// <param name="stream">The stream to read the bitmap from.</param> 
+        /// <param name="width">The desired width of the resulting bitmap.</param>
+        /// <param name="interpolationMode">The <see cref="BitmapInterpolationMode"/> to use should resizing be required.</param>
+        /// <returns>An <see cref="IWriteableBitmapImpl"/>.</returns>
+        IWriteableBitmapImpl LoadWriteableBitmapToWidth(Stream stream, int width, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality);
+
+        /// <summary>
+        /// Loads a WriteableBitmap implementation from a stream to a specified height maintaining aspect ratio.
+        /// </summary>
+        /// <param name="stream">The stream to read the bitmap from.</param> 
+        /// <param name="height">The desired height of the resulting bitmap.</param>
+        /// <param name="interpolationMode">The <see cref="BitmapInterpolationMode"/> to use should resizing be required.</param>
+        /// <returns>An <see cref="IBitmapImpl"/>.</returns>
+        IWriteableBitmapImpl LoadWriteableBitmapToHeight(Stream stream, int height, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality);
+        
+        /// <summary>
+        /// Loads a WriteableBitmap implementation from a file.
+        /// </summary>
+        /// <param name="fileName">The filename of the bitmap.</param>        
+        /// <returns>An <see cref="IBitmapImpl"/>.</returns>
+        IWriteableBitmapImpl LoadWriteableBitmap(string fileName);
+
+        /// <summary>
+        /// Loads a WriteableBitmap implementation from a file.
+        /// </summary>
+        /// <param name="stream">The stream to read the bitmap from.</param>        
+        /// <returns>An <see cref="IBitmapImpl"/>.</returns>
+        IWriteableBitmapImpl LoadWriteableBitmap(Stream stream);
+
         /// <summary>
         /// Loads a bitmap implementation from a stream to a specified width maintaining aspect ratio.
         /// </summary>

+ 1 - 4
src/Avalonia.Visuals/Rendering/ICustomSimpleHitTest.cs

@@ -11,16 +11,13 @@ namespace Avalonia.Rendering
     /// </summary>
     public interface ICustomSimpleHitTest
     {
+        /// <param name="point">The point to hit test in global coordinate space.</param>
         bool HitTest(Point point);
     }
 
     /// <summary>
     /// Allows customization of hit-testing for all renderers.
     /// </summary>
-    /// <remarks>
-    /// Note that this interface can only used to make a portion of a control non-hittable, it
-    /// cannot expand the hittable area of a control.
-    /// </remarks>
     public interface ICustomHitTest : ICustomSimpleHitTest
     {
     }

+ 1 - 1
src/Avalonia.Visuals/Rendering/ImmediateRenderer.cs

@@ -225,7 +225,7 @@ namespace Avalonia.Rendering
 
             if (filter?.Invoke(visual) != false)
             {
-                bool containsPoint = false;
+                bool containsPoint;
 
                 if (visual is ICustomSimpleHitTest custom)
                 {

+ 3 - 3
src/Avalonia.Visuals/Rendering/SceneGraph/Scene.cs

@@ -256,7 +256,8 @@ namespace Avalonia.Rendering.SceneGraph
 
                     if (childCount == 0 || wasVisited)
                     {
-                        if ((wasVisited || FilterAndClip(node, ref clip)) && node.HitTest(_point))
+                        if ((wasVisited || FilterAndClip(node, ref clip)) &&
+                            (node.Visual is ICustomSimpleHitTest custom ? custom.HitTest(_point) : node.HitTest(_point)))
                         {
                             _current = node.Visual;
 
@@ -311,8 +312,7 @@ namespace Avalonia.Rendering.SceneGraph
 
                     if (!clipped && node.Visual is ICustomHitTest custom)
                     {
-                        var controlPoint = _sceneRoot.Visual.TranslatePoint(_point, node.Visual);
-                        clipped = !custom.HitTest(controlPoint.Value);
+                        clipped = !custom.HitTest(_point);
                     }
 
                     return !clipped;

+ 13 - 9
src/Skia/Avalonia.Skia/DrawingContextImpl.cs

@@ -166,7 +166,10 @@ namespace Avalonia.Skia
         {
             using (var paint = CreatePaint(_strokePaint, pen, new Size(Math.Abs(p2.X - p1.X), Math.Abs(p2.Y - p1.Y))))
             {
-                Canvas.DrawLine((float) p1.X, (float) p1.Y, (float) p2.X, (float) p2.Y, paint.Paint);
+                if (paint.Paint is object)
+                {
+                    Canvas.DrawLine((float)p1.X, (float)p1.Y, (float)p2.X, (float)p2.Y, paint.Paint);
+                }
             }
         }
 
@@ -361,7 +364,6 @@ namespace Avalonia.Skia
                     {
                         Canvas.DrawRect(rc, paint.Paint);
                     }
-                  
                 }
             }
 
@@ -397,15 +399,17 @@ namespace Avalonia.Skia
             {
                 using (var paint = CreatePaint(_strokePaint, pen, rect.Rect.Size))
                 {
-                    if (isRounded)
-                    {
-                        Canvas.DrawRoundRect(skRoundRect, paint.Paint);
-                    }
-                    else
+                    if (paint.Paint is object)
                     {
-                        Canvas.DrawRect(rc, paint.Paint);
+                        if (isRounded)
+                        {
+                            Canvas.DrawRoundRect(skRoundRect, paint.Paint);
+                        }
+                        else
+                        {
+                            Canvas.DrawRect(rc, paint.Paint);
+                        }
                     }
-                   
                 }
             }
         }

+ 25 - 0
src/Skia/Avalonia.Skia/PlatformRenderInterface.cs

@@ -77,6 +77,31 @@ namespace Avalonia.Skia
             return new ImmutableBitmap(stream);
         }
 
+        public IWriteableBitmapImpl LoadWriteableBitmapToWidth(Stream stream, int width,
+            BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
+        {
+            return new WriteableBitmapImpl(stream, width, true, interpolationMode);
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmapToHeight(Stream stream, int height,
+            BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
+        {
+            return new WriteableBitmapImpl(stream, height, false, interpolationMode);
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmap(string fileName)
+        {
+            using (var stream = File.OpenRead(fileName))
+            {
+                return LoadWriteableBitmap(stream);
+            }
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmap(Stream stream)
+        {
+            return new WriteableBitmapImpl(stream);
+        }
+
         /// <inheritdoc />
         public IBitmapImpl LoadBitmap(PixelFormat format, AlphaFormat alphaFormat, IntPtr data, PixelSize size, Vector dpi, int stride)
         {

+ 65 - 0
src/Skia/Avalonia.Skia/WriteableBitmapImpl.cs

@@ -1,8 +1,10 @@
 using System;
 using System.IO;
 using System.Threading;
+using Avalonia.Media.Imaging;
 using Avalonia.Platform;
 using Avalonia.Skia.Helpers;
+using Avalonia.Visuals.Media.Imaging;
 using SkiaSharp;
 
 namespace Avalonia.Skia
@@ -15,7 +17,70 @@ namespace Avalonia.Skia
         private static readonly SKBitmapReleaseDelegate s_releaseDelegate = ReleaseProc;
         private readonly SKBitmap _bitmap;
         private readonly object _lock = new object();
+        
+        /// <summary>
+        /// Create a WriteableBitmap from given stream.
+        /// </summary>
+        /// <param name="stream">Stream containing encoded data.</param>
+        public WriteableBitmapImpl(Stream stream)
+        {
+            using (var skiaStream = new SKManagedStream(stream))
+            {
+                _bitmap = SKBitmap.Decode(skiaStream);
+
+                if (_bitmap == null)
+                {
+                    throw new ArgumentException("Unable to load bitmap from provided data");
+                }
+
+                PixelSize = new PixelSize(_bitmap.Width, _bitmap.Height);
+                Dpi = SkiaPlatform.DefaultDpi;
+            }
+        }
+
+        public WriteableBitmapImpl(Stream stream, int decodeSize, bool horizontal, BitmapInterpolationMode interpolationMode)
+        {
+            using (var skStream = new SKManagedStream(stream))
+            using (var codec = SKCodec.Create(skStream))
+            {
+                var info = codec.Info;
 
+                // get the scale that is nearest to what we want (eg: jpg returned 512)
+                var supportedScale = codec.GetScaledDimensions(horizontal ? ((float)decodeSize / info.Width) : ((float)decodeSize / info.Height));
+
+                // decode the bitmap at the nearest size
+                var nearest = new SKImageInfo(supportedScale.Width, supportedScale.Height);
+                var bmp = SKBitmap.Decode(codec, nearest);
+
+                // now scale that to the size that we want
+                var realScale = horizontal ? ((double)info.Height / info.Width) : ((double)info.Width / info.Height);
+
+                SKImageInfo desired;
+
+
+                if (horizontal)
+                {
+                    desired = new SKImageInfo(decodeSize, (int)(realScale * decodeSize));
+                }
+                else
+                {
+                    desired = new SKImageInfo((int)(realScale * decodeSize), decodeSize);
+                }
+
+                if (bmp.Width != desired.Width || bmp.Height != desired.Height)
+                {
+                    var scaledBmp = bmp.Resize(desired, interpolationMode.ToSKFilterQuality());
+                    bmp.Dispose();
+                    bmp = scaledBmp;
+                }
+
+                _bitmap = bmp;
+
+                PixelSize = new PixelSize(bmp.Width, bmp.Height);
+                Dpi = SkiaPlatform.DefaultDpi;
+            }
+        }
+        
         /// <summary>
         /// Create new writeable bitmap.
         /// </summary>

+ 22 - 0
src/Windows/Avalonia.Direct2D1/Direct2D1Platform.cs

@@ -188,6 +188,28 @@ namespace Avalonia.Direct2D1
             return new WicBitmapImpl(stream);
         }
 
+        public IWriteableBitmapImpl LoadWriteableBitmapToWidth(Stream stream, int width,
+            BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
+        {
+            return new WriteableWicBitmapImpl(stream, width, true, interpolationMode);
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmapToHeight(Stream stream, int height,
+            BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
+        {
+            return new WriteableWicBitmapImpl(stream, height, false, interpolationMode);
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmap(string fileName)
+        {
+            return new WriteableWicBitmapImpl(fileName);
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmap(Stream stream)
+        {
+            return new WriteableWicBitmapImpl(stream);
+        }
+
         /// <inheritdoc />
         public IBitmapImpl LoadBitmapToWidth(Stream stream, int width, BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
         {

+ 17 - 0
src/Windows/Avalonia.Direct2D1/Media/Imaging/WriteableWicBitmapImpl.cs

@@ -1,4 +1,5 @@
 using System;
+using System.IO;
 using Avalonia.Platform;
 using SharpDX.WIC;
 using PixelFormat = Avalonia.Platform.PixelFormat;
@@ -7,11 +8,27 @@ namespace Avalonia.Direct2D1.Media.Imaging
 {
     class WriteableWicBitmapImpl : WicBitmapImpl, IWriteableBitmapImpl
     {
+        public WriteableWicBitmapImpl(Stream stream, int decodeSize, bool horizontal,
+            Avalonia.Visuals.Media.Imaging.BitmapInterpolationMode interpolationMode)
+        : base(stream, decodeSize, horizontal, interpolationMode)
+        {
+        }
+        
         public WriteableWicBitmapImpl(PixelSize size, Vector dpi, PixelFormat? pixelFormat, AlphaFormat? alphaFormat) 
             : base(size, dpi, pixelFormat, alphaFormat)
         {
         }
 
+        public WriteableWicBitmapImpl(Stream stream)
+            : base(stream)
+        {
+        }
+
+        public WriteableWicBitmapImpl(string fileName)
+            : base(fileName)
+        {
+        }
+
         class LockedBitmap : ILockedFramebuffer
         {
             private readonly WriteableWicBitmapImpl _parent;

+ 22 - 0
tests/Avalonia.Benchmarks/NullRenderingPlatform.cs

@@ -61,6 +61,28 @@ namespace Avalonia.Benchmarks
             throw new NotImplementedException();
         }
 
+        public IWriteableBitmapImpl LoadWriteableBitmapToWidth(Stream stream, int width,
+            BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
+        {
+            throw new NotImplementedException();
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmapToHeight(Stream stream, int height,
+            BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
+        {
+            throw new NotImplementedException();
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmap(string fileName)
+        {
+            throw new NotImplementedException();
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmap(Stream stream)
+        {
+            throw new NotImplementedException();
+        }
+
         public IBitmapImpl LoadBitmap(PixelFormat format, AlphaFormat alphaFormat, IntPtr data, PixelSize size, Vector dpi, int stride)
         {
             throw new NotImplementedException();

+ 63 - 0
tests/Avalonia.Benchmarks/Themes/ThemeBenchmark.cs

@@ -0,0 +1,63 @@
+using System;
+
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml.Styling;
+using Avalonia.Shared.PlatformSupport;
+using Avalonia.Styling;
+using Avalonia.UnitTests;
+
+using BenchmarkDotNet.Attributes;
+
+namespace Avalonia.Benchmarks.Themes
+{
+    [MemoryDiagnoser]
+    public class ThemeBenchmark : IDisposable
+    {
+        private IDisposable _app;
+
+        public ThemeBenchmark()
+        {
+            AssetLoader.RegisterResUriParsers();
+
+            _app = UnitTestApplication.Start(TestServices.StyledWindow.With(theme: () => null));
+            // Add empty style to override it later
+            UnitTestApplication.Current.Styles.Add(new Style());
+        }
+
+        [Benchmark]
+        [Arguments("avares://Avalonia.Themes.Fluent/FluentDark.xaml")]
+        [Arguments("avares://Avalonia.Themes.Fluent/FluentLight.xaml")]
+        public bool InitFluentTheme(string themeUri)
+        {
+            UnitTestApplication.Current.Styles[0] = new StyleInclude(new Uri("resm:Styles?assembly=Avalonia.Benchmarks"))
+            {
+                Source = new Uri(themeUri)
+            };
+            return ((IResourceHost)UnitTestApplication.Current).TryGetResource("SystemAccentColor", out _);
+        }
+
+        [Benchmark]
+        [Arguments("avares://Avalonia.Themes.Default/Accents/BaseLight.xaml")]
+        [Arguments("avares://Avalonia.Themes.Default/Accents/BaseDark.xaml")]
+        public bool InitDefaultTheme(string themeUri)
+        {
+            UnitTestApplication.Current.Styles[0] = new Styles
+            {
+                new StyleInclude(new Uri("resm:Styles?assembly=Avalonia.Benchmarks"))
+                {
+                    Source = new Uri(themeUri)
+                },
+                new StyleInclude(new Uri("resm:Styles?assembly=Avalonia.Benchmarks"))
+                {
+                    Source = new Uri("avares://Avalonia.Themes.Default/DefaultTheme.xaml")
+                }
+            };
+            return ((IResourceHost)UnitTestApplication.Current).TryGetResource("ThemeAccentColor", out _);
+        }
+
+        public void Dispose()
+        {
+            _app.Dispose();
+        }
+    }
+}

+ 56 - 0
tests/Avalonia.Controls.UnitTests/ViewboxTests.cs

@@ -114,5 +114,61 @@ namespace Avalonia.Controls.UnitTests
             Assert.Equal(2.0, scaleTransform.ScaleX);
             Assert.Equal(2.0, scaleTransform.ScaleY);
         }
+
+        [Theory]
+        [InlineData(50, 100, 50, 100, 50, 100, 1)]
+        [InlineData(50, 100, 150, 150, 50, 100, 1)]
+        [InlineData(50, 100, 25, 50, 25, 50, 0.5)]
+        public void Viewbox_Should_Return_Correct_SizeAndScale_StretchDirection_DownOnly(
+            double childWidth, double childHeight,
+            double viewboxWidth, double viewboxHeight,
+            double expectedWidth, double expectedHeight,
+            double expectedScale)
+        {
+            var target = new Viewbox
+            {
+                Child = new Control { Width = childWidth, Height = childHeight },
+                StretchDirection = StretchDirection.DownOnly
+            };
+
+            target.Measure(new Size(viewboxWidth, viewboxHeight));
+            target.Arrange(new Rect(default, target.DesiredSize));
+
+            Assert.Equal(new Size(expectedWidth, expectedHeight), target.DesiredSize);
+
+            var scaleTransform = target.Child.RenderTransform as ScaleTransform;
+
+            Assert.NotNull(scaleTransform);
+            Assert.Equal(expectedScale, scaleTransform.ScaleX);
+            Assert.Equal(expectedScale, scaleTransform.ScaleY);
+        }
+
+        [Theory]
+        [InlineData(50, 100, 50, 100, 50, 100, 1)]
+        [InlineData(50, 100, 25, 50, 25, 50, 1)]
+        [InlineData(50, 100, 150, 150, 75, 150, 1.5)]
+        public void Viewbox_Should_Return_Correct_SizeAndScale_StretchDirection_UpOnly(
+            double childWidth, double childHeight,
+            double viewboxWidth, double viewboxHeight,
+            double expectedWidth, double expectedHeight,
+            double expectedScale)
+        {
+            var target = new Viewbox
+            {
+                Child = new Control { Width = childWidth, Height = childHeight },
+                StretchDirection = StretchDirection.UpOnly
+            };
+
+            target.Measure(new Size(viewboxWidth, viewboxHeight));
+            target.Arrange(new Rect(default, target.DesiredSize));
+
+            Assert.Equal(new Size(expectedWidth, expectedHeight), target.DesiredSize);
+
+            var scaleTransform = target.Child.RenderTransform as ScaleTransform;
+
+            Assert.NotNull(scaleTransform);
+            Assert.Equal(expectedScale, scaleTransform.ScaleX);
+            Assert.Equal(expectedScale, scaleTransform.ScaleY);
+        }
     }
 }

+ 30 - 0
tests/Avalonia.Skia.UnitTests/DrawingContextImplTests.cs

@@ -0,0 +1,30 @@
+using Avalonia.Media;
+using Avalonia.Skia.Helpers;
+using SkiaSharp;
+using Xunit;
+
+namespace Avalonia.Skia.UnitTests
+{
+    public class DrawingContextImplTests
+    {
+        [Fact]
+        public void DrawLine_With_Zero_Thickness_Pen_Does_Not_Throw()
+        {
+            var target = CreateTarget();
+            target.DrawLine(new Pen(Brushes.Black, 0), new Point(0, 0), new Point(10, 10));
+        }
+
+        [Fact]
+        public void DrawRectangle_With_Zero_Thickness_Pen_Does_Not_Throw()
+        {
+            var target = CreateTarget();
+            target.DrawRectangle(Brushes.Black, new Pen(Brushes.Black, 0), new RoundedRect(new Rect(0, 0, 100, 100), new CornerRadius(4)));
+        }
+
+        private DrawingContextImpl CreateTarget()
+        {
+            var canvas = new SKCanvas(new SKBitmap(100, 100));
+            return (DrawingContextImpl)DrawingContextHelper.WrapSkiaCanvas(canvas, new Vector(96, 96));
+        }
+    }
+}

+ 18 - 0
tests/Avalonia.Skia.UnitTests/Media/TextFormatting/TextFormatterTests.cs

@@ -401,6 +401,24 @@ namespace Avalonia.Skia.UnitTests.Media.TextFormatting
                 Assert.Equal(expectedOffset, textLine.Start);
             }
         }
+
+        [Fact]
+        public void Should_FormatLine_With_Emergency_Breaks()
+        {
+            using (Start())
+            {
+                var defaultProperties = new GenericTextRunProperties(Typeface.Default);
+                var paragraphProperties = new GenericTextParagraphProperties(defaultProperties, textWrap: TextWrapping.Wrap);
+                
+                var textSource = new SingleBufferTextSource("0123456789_0123456789_0123456789_0123456789", defaultProperties);
+                var formatter = new TextFormatterImpl();
+                
+                var textLine =
+                    formatter.FormatLine(textSource, 0, 33, paragraphProperties);
+                
+                Assert.NotNull(textLine.TextLineBreak?.RemainingCharacters);
+            }
+        }
         
         public static IDisposable Start()
         {

+ 22 - 0
tests/Avalonia.UnitTests/MockPlatformRenderInterface.cs

@@ -66,6 +66,28 @@ namespace Avalonia.UnitTests
             return Mock.Of<IBitmapImpl>();
         }
 
+        public IWriteableBitmapImpl LoadWriteableBitmapToWidth(Stream stream, int width,
+            BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
+        {
+            throw new NotImplementedException();
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmapToHeight(Stream stream, int height,
+            BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
+        {
+            throw new NotImplementedException();
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmap(string fileName)
+        {
+            throw new NotImplementedException();
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmap(Stream stream)
+        {
+            throw new NotImplementedException();
+        }
+
         public IBitmapImpl LoadBitmap(string fileName)
         {
             return Mock.Of<IBitmapImpl>();

+ 17 - 0
tests/Avalonia.Visuals.UnitTests/Rendering/CustomHitTestBorder.cs

@@ -0,0 +1,17 @@
+using Avalonia.Controls;
+using Avalonia.Media;
+using Avalonia.Rendering;
+
+namespace Avalonia.Visuals.UnitTests.Rendering
+{
+    internal class CustomHitTestBorder : Border, ICustomHitTest
+    {
+        public bool HitTest(Point point)
+        {
+            // Move hit testing window halfway to the left
+            return Bounds
+                .WithX(Bounds.X - Bounds.Width / 2)  
+                .Contains(point);
+        }
+    }
+}

+ 40 - 3
tests/Avalonia.Visuals.UnitTests/Rendering/DeferredRendererTests_HitTesting.cs

@@ -1,6 +1,9 @@
-using System.Linq;
+using System;
+using System.Linq;
 using Avalonia.Controls;
 using Avalonia.Controls.Presenters;
+using Avalonia.Controls.Shapes;
+using Avalonia.Input;
 using Avalonia.Layout;
 using Avalonia.Media;
 using Avalonia.Platform;
@@ -9,8 +12,6 @@ using Avalonia.UnitTests;
 using Avalonia.VisualTree;
 using Moq;
 using Xunit;
-using System;
-using Avalonia.Controls.Shapes;
 
 namespace Avalonia.Visuals.UnitTests.Rendering
 {
@@ -501,6 +502,42 @@ namespace Avalonia.Visuals.UnitTests.Rendering
             }
         }
 
+        [Fact]
+        public void HitTest_Should_Accommodate_ICustomHitTest()
+        {
+            using (TestApplication())
+            {
+                Border border;
+
+                var root = new TestRoot
+                {
+                    Width = 300,
+                    Height = 200,
+                    Child = border = new CustomHitTestBorder
+                    {
+                        Width = 100,
+                        Height = 100,
+                        Background = Brushes.Red,
+                        HorizontalAlignment = HorizontalAlignment.Center,
+                        VerticalAlignment = VerticalAlignment.Center
+                    }
+                }; 
+
+                root.Renderer = new DeferredRenderer(root, null);
+                root.Measure(Size.Infinity);
+                root.Arrange(new Rect(root.DesiredSize));
+
+                var result = root.Renderer.HitTest(new Point(75, 100), root, null);
+                Assert.Equal(new[] { border }, result);
+
+                result = root.Renderer.HitTest(new Point(125, 100), root, null);
+                Assert.Equal(new[] { border }, result);
+
+                result = root.Renderer.HitTest(new Point(175, 100), root, null);
+                Assert.Empty(result);
+            }
+        }
+
         private IDisposable TestApplication()
         {
             return UnitTestApplication.Start(TestServices.MockPlatformRenderInterface);

+ 37 - 0
tests/Avalonia.Visuals.UnitTests/Rendering/ImmediateRendererTests_HitTesting.cs

@@ -413,6 +413,43 @@ namespace Avalonia.Visuals.UnitTests.Rendering
             }
         }
 
+        [Fact]
+        public void HitTest_Should_Accommodate_ICustomHitTest()
+        {
+            using (TestApplication())
+            {
+                Border border;
+
+                var root = new TestRoot
+                {
+                    Width = 300,
+                    Height = 200,
+                    Child = border = new CustomHitTestBorder
+                    {
+                        Width = 100,
+                        Height = 100,
+                        Background = Brushes.Red,
+                        HorizontalAlignment = HorizontalAlignment.Center,
+                        VerticalAlignment = VerticalAlignment.Center
+                    }
+                };
+
+                root.Renderer = new ImmediateRenderer(root);
+                root.Measure(Size.Infinity);
+                root.Arrange(new Rect(root.DesiredSize));
+                root.Renderer.Paint(new Rect(root.ClientSize));
+
+                var result = root.Renderer.HitTest(new Point(75, 100), root, null).First();
+                Assert.Equal(border, result);
+
+                result = root.Renderer.HitTest(new Point(125, 100), root, null).First();
+                Assert.Equal(border, result);
+
+                result = root.Renderer.HitTest(new Point(175, 100), root, null).First();
+                Assert.Equal(root, result);
+            }
+        }
+
         private IDisposable TestApplication()
         {
             return UnitTestApplication.Start(TestServices.MockPlatformRenderInterface);

+ 22 - 0
tests/Avalonia.Visuals.UnitTests/VisualTree/MockRenderInterface.cs

@@ -42,6 +42,28 @@ namespace Avalonia.Visuals.UnitTests.VisualTree
             throw new NotImplementedException();
         }
 
+        public IWriteableBitmapImpl LoadWriteableBitmapToWidth(Stream stream, int width,
+            BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
+        {
+            throw new NotImplementedException();
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmapToHeight(Stream stream, int height,
+            BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.HighQuality)
+        {
+            throw new NotImplementedException();
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmap(string fileName)
+        {
+            throw new NotImplementedException();
+        }
+
+        public IWriteableBitmapImpl LoadWriteableBitmap(Stream stream)
+        {
+            throw new NotImplementedException();
+        }
+
         public IBitmapImpl LoadBitmap(string fileName)
         {
             throw new NotImplementedException();