瀏覽代碼

Merge pull request #174 from PixiEditor/colorpicker-update

Update color picker, relax stylecop rules, fixes
Egor Mozgovoy 4 年之前
父節點
當前提交
644b05a153
共有 35 個文件被更改,包括 636 次插入448 次删除
  1. 62 0
      Custom.ruleset
  2. 1 6
      PixiEditor/Exceptions/CorruptedFileException.cs
  3. 1 1
      PixiEditor/Helpers/Converters/DoubleToIntConverter.cs
  4. 19 0
      PixiEditor/Helpers/Converters/FloorConverter.cs
  5. 20 0
      PixiEditor/Helpers/Converters/IntToPickerTypeConverter.cs
  6. 26 0
      PixiEditor/Helpers/Converters/ThresholdVisibilityConverter.cs
  7. 3 3
      PixiEditor/Models/Controllers/BitmapChangedEventArgs.cs
  8. 27 28
      PixiEditor/Models/Controllers/ClipboardController.cs
  9. 16 9
      PixiEditor/Models/ImageManipulation/BitmapUtils.cs
  10. 14 14
      PixiEditor/Models/Layers/Layer.cs
  11. 4 4
      PixiEditor/Models/Processes/ProcessHelper.cs
  12. 8 10
      PixiEditor/Models/Tools/Tools/PenTool.cs
  13. 4 4
      PixiEditor/PixiEditor.csproj
  14. 6 6
      PixiEditor/Styles/AvalonDock/NamespaceDoc.cs
  15. 6 6
      PixiEditor/Styles/AvalonDock/Themes/Menu/NamespaceDoc.cs
  16. 4 4
      PixiEditor/Styles/AvalonDock/Themes/NamespaceDoc.cs
  17. 175 174
      PixiEditor/Styles/AvalonDock/Themes/ResourceKeys.cs
  18. 6 6
      PixiEditor/ViewModels/ImportFilePopupViewModel.cs
  19. 5 5
      PixiEditor/ViewModels/SaveFilePopupViewModel.cs
  20. 1 1
      PixiEditor/ViewModels/ViewModelBase.cs
  21. 6 6
      PixiEditor/Views/Dialogs/ConfirmationPopup.xaml.cs
  22. 9 18
      PixiEditor/Views/Dialogs/HelloTherePopup.xaml.cs
  23. 6 6
      PixiEditor/Views/Dialogs/ResizeCanvasPopup.xaml.cs
  24. 3 5
      PixiEditor/Views/Dialogs/ResizeDocumentPopup.xaml.cs
  25. 5 7
      PixiEditor/Views/Dialogs/SaveFilePopup.xaml.cs
  26. 79 68
      PixiEditor/Views/MainWindow.xaml
  27. 5 11
      PixiEditor/Views/MainWindow.xaml.cs
  28. 6 7
      PixiEditor/Views/UserControls/AnchorPointPicker.xaml.cs
  29. 2 2
      PixiEditor/Views/UserControls/MainDrawingPanel.xaml
  30. 13 15
      PixiEditor/Views/UserControls/MainDrawingPanel.xaml.cs
  31. 4 4
      PixiEditor/Views/UserControls/MenuButton.xaml.cs
  32. 1 9
      PixiEditor/Views/UserControls/Rotatebox.xaml.cs
  33. 75 0
      PixiEditor/Views/UserControls/SmallColorPicker.xaml
  34. 12 0
      PixiEditor/Views/UserControls/SmallColorPicker.xaml.cs
  35. 2 9
      stylecop.json

+ 62 - 0
Custom.ruleset

@@ -1,14 +1,76 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RuleSet Name="Name" Description="Description" ToolsVersion="16.0">
+  <Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.Features" RuleNamespace="Microsoft.CodeAnalysis.CSharp.Features">
+    <Rule Id="IDE0090" Action="None" />
+  </Rules>
   <Rules AnalyzerId="Microsoft.NetCore.Analyzers" RuleNamespace="Microsoft.NetCore.Analyzers">
     <Rule Id="CA1303" Action="None" />
   </Rules>
   <Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
     <Rule Id="SA0001" Action="None" />
+    <Rule Id="SA1000" Action="None" />
+    <Rule Id="SA1005" Action="None" />
+    <Rule Id="SA1007" Action="None" />
+    <Rule Id="SA1028" Action="None" />
     <Rule Id="SA1101" Action="None" />
+    <Rule Id="SA1110" Action="None" />
+    <Rule Id="SA1111" Action="None" />
+    <Rule Id="SA1112" Action="None" />
+    <Rule Id="SA1117" Action="None" />
+    <Rule Id="SA1119" Action="None" />
+    <Rule Id="SA1122" Action="None" />
+    <Rule Id="SA1124" Action="None" />
+    <Rule Id="SA1128" Action="None" />
+    <Rule Id="SA1130" Action="None" />
+    <Rule Id="SA1132" Action="None" />
+    <Rule Id="SA1135" Action="None" />
+    <Rule Id="SA1136" Action="None" />
+    <Rule Id="SA1139" Action="None" />
+    <Rule Id="SA1200" Action="None" />
     <Rule Id="SA1201" Action="None" />
+    <Rule Id="SA1207" Action="None" />
+    <Rule Id="SA1208" Action="None" />
+    <Rule Id="SA1209" Action="None" />
+    <Rule Id="SA1210" Action="None" />
+    <Rule Id="SA1211" Action="None" />
+    <Rule Id="SA1216" Action="None" />
+    <Rule Id="SA1217" Action="None" />
+    <Rule Id="SA1303" Action="None" />
+    <Rule Id="SA1304" Action="None" />
+    <Rule Id="SA1307" Action="None" />
+    <Rule Id="SA1309" Action="None" />
     <Rule Id="SA1310" Action="None" />
+    <Rule Id="SA1311" Action="None" />
+    <Rule Id="SA1400" Action="None" />
+    <Rule Id="SA1401" Action="None" />
+    <Rule Id="SA1405" Action="None" />
+    <Rule Id="SA1406" Action="None" />
+    <Rule Id="SA1407" Action="None" />
+    <Rule Id="SA1410" Action="None" />
+    <Rule Id="SA1411" Action="None" />
     <Rule Id="SA1413" Action="None" />
+    <Rule Id="SA1501" Action="None" />
+    <Rule Id="SA1502" Action="None" />
+    <Rule Id="SA1503" Action="None" />
+    <Rule Id="SA1505" Action="None" />
+    <Rule Id="SA1507" Action="None" />
+    <Rule Id="SA1508" Action="None" />
+    <Rule Id="SA1512" Action="None" />
+    <Rule Id="SA1513" Action="None" />
+    <Rule Id="SA1515" Action="None" />
+    <Rule Id="SA1516" Action="None" />
+    <Rule Id="SA1518" Action="None" />
+    <Rule Id="SA1600" Action="None" />
+    <Rule Id="SA1601" Action="None" />
+    <Rule Id="SA1602" Action="None" />
+    <Rule Id="SA1604" Action="None" />
+    <Rule Id="SA1605" Action="None" />
+    <Rule Id="SA1606" Action="None" />
+    <Rule Id="SA1607" Action="None" />
+    <Rule Id="SA1629" Action="None" />
     <Rule Id="SA1633" Action="None" />
+    <Rule Id="SA1642" Action="None" />
+    <Rule Id="SA1643" Action="None" />
+    <Rule Id="SA1648" Action="None" />
   </Rules>
 </RuleSet>

+ 1 - 6
PixiEditor/Exceptions/CorruptedFileException.cs

@@ -1,12 +1,7 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 
 namespace PixiEditor.Exceptions
 {
-
     [Serializable]
     public class CorruptedFileException : Exception
     {
@@ -32,4 +27,4 @@ namespace PixiEditor.Exceptions
         {
         }
     }
-}
+}

+ 1 - 1
PixiEditor/Helpers/Converters/DoubleToIntConverter.cs

@@ -22,4 +22,4 @@ namespace PixiEditor.Helpers.Converters
             throw new NotImplementedException();
         }
     }
-}
+}

+ 19 - 0
PixiEditor/Helpers/Converters/FloorConverter.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Globalization;
+using System.Windows.Data;
+
+namespace PixiEditor.Helpers.Converters
+{
+    class FloorConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            return Math.Floor((double)value);
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            return value;
+        }
+    }
+}

+ 20 - 0
PixiEditor/Helpers/Converters/IntToPickerTypeConverter.cs

@@ -0,0 +1,20 @@
+using ColorPicker.Models;
+using System;
+using System.Globalization;
+using System.Windows.Data;
+
+namespace PixiEditor.Helpers.Converters
+{
+    public class IntToPickerTypeConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            return (PickerType)value;
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            return (int)value;
+        }
+    }
+}

+ 26 - 0
PixiEditor/Helpers/Converters/ThresholdVisibilityConverter.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Globalization;
+using System.Windows;
+using System.Windows.Data;
+
+namespace PixiEditor.Helpers.Converters
+{
+    class ThresholdVisibilityConverter : IValueConverter
+    {
+        public double Threshold { get; set; } = 100;
+        public bool CheckIfLess { get; set; } = false;
+
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (CheckIfLess)
+                return (double)value < Threshold ? Visibility.Visible : Visibility.Hidden;
+            else
+                return (double)value >= Threshold ? Visibility.Visible : Visibility.Hidden;
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

+ 3 - 3
PixiEditor/Models/Controllers/BitmapChangedEventArgs.cs

@@ -1,5 +1,5 @@
-using System;
-using PixiEditor.Models.DataHolders;
+using PixiEditor.Models.DataHolders;
+using System;
 
 namespace PixiEditor.Models.Controllers
 {
@@ -16,6 +16,6 @@ namespace PixiEditor.Models.Controllers
 
         public BitmapPixelChanges OldPixelsValues { get; set; }
 
-        public Guid ChangedLayerGuid{ get; set; }
+        public Guid ChangedLayerGuid { get; set; }
     }
 }

+ 27 - 28
PixiEditor/Models/Controllers/ClipboardController.cs

@@ -1,13 +1,12 @@
-using System.IO;
-using System.Linq;
-using System.Windows;
-using System.Windows.Media.Imaging;
-using PixiEditor.Models.DataHolders;
-using PixiEditor.Models.ImageManipulation;
+using PixiEditor.Models.ImageManipulation;
 using PixiEditor.Models.Layers;
 using PixiEditor.Models.Position;
 using PixiEditor.Models.Undo;
 using PixiEditor.ViewModels;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Media.Imaging;
 
 namespace PixiEditor.Models.Controllers
 {
@@ -52,26 +51,6 @@ namespace PixiEditor.Models.Controllers
             }
         }
 
-        private static void RemoveLayerProcess(object[] parameters)
-        {
-            if (parameters.Length == 0 || !(parameters[0] is int))
-            {
-                return;
-            }
-
-            ViewModelMain.Current.BitmapManager.ActiveDocument.RemoveLayer((int)parameters[0]);
-        }
-
-        private static void AddLayerProcess(object[] parameters)
-        {
-            if (parameters.Length == 0 || !(parameters[0] is WriteableBitmap))
-            {
-                return;
-            }
-
-            AddImageToLayers((WriteableBitmap)parameters[0]);
-        }
-
         /// <summary>
         ///     Gets image from clipboard, supported PNG, Dib and Bitmap.
         /// </summary>
@@ -93,11 +72,11 @@ namespace PixiEditor.Models.Controllers
             }
             else if (dao.GetDataPresent(DataFormats.Dib))
             {
-                finalImage = new WriteableBitmap(Clipboard.GetImage() !);
+                finalImage = new WriteableBitmap(Clipboard.GetImage()!);
             }
             else if (dao.GetDataPresent(DataFormats.Bitmap))
             {
-                finalImage = new WriteableBitmap((dao.GetData(DataFormats.Bitmap) as BitmapSource) !);
+                finalImage = new WriteableBitmap((dao.GetData(DataFormats.Bitmap) as BitmapSource)!);
             }
 
             return finalImage;
@@ -128,5 +107,25 @@ namespace PixiEditor.Models.Controllers
         {
             ViewModelMain.Current.BitmapManager.ActiveDocument.AddNewLayer("Image", image);
         }
+
+        private static void RemoveLayerProcess(object[] parameters)
+        {
+            if (parameters.Length == 0 || !(parameters[0] is int))
+            {
+                return;
+            }
+
+            ViewModelMain.Current.BitmapManager.ActiveDocument.RemoveLayer((int)parameters[0]);
+        }
+
+        private static void AddLayerProcess(object[] parameters)
+        {
+            if (parameters.Length == 0 || !(parameters[0] is WriteableBitmap))
+            {
+                return;
+            }
+
+            AddImageToLayers((WriteableBitmap)parameters[0]);
+        }
     }
 }

+ 16 - 9
PixiEditor/Models/ImageManipulation/BitmapUtils.cs

@@ -1,13 +1,13 @@
-using System;
+using PixiEditor.Models.DataHolders;
+using PixiEditor.Models.Layers;
+using PixiEditor.Models.Position;
+using PixiEditor.Parser;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Windows;
 using System.Windows.Media;
 using System.Windows.Media.Imaging;
-using PixiEditor.Models.DataHolders;
-using PixiEditor.Models.Layers;
-using PixiEditor.Models.Position;
-using PixiEditor.Parser;
 
 namespace PixiEditor.Models.ImageManipulation
 {
@@ -34,9 +34,9 @@ namespace PixiEditor.Models.ImageManipulation
         /// <summary>
         ///     Converts layers bitmaps into one bitmap.
         /// </summary>
-        /// <param name="layers">Layers to combine.</param>
         /// <param name="width">Width of final bitmap.</param>
         /// <param name="height">Height of final bitmap.</param>.
+        /// <param name="layers">Layers to combine.</param>
         /// <returns>WriteableBitmap of layered bitmaps.</returns>
         public static WriteableBitmap CombineLayers(int width, int height, params Layer[] layers)
         {
@@ -49,6 +49,13 @@ namespace PixiEditor.Models.ImageManipulation
                     float layerOpacity = layers[i].Opacity;
                     Layer layer = layers[i];
 
+                    if (layer.OffsetX < 0 || layer.OffsetY < 0 ||
+                        layer.Width + layer.OffsetX > layer.MaxWidth ||
+                        layer.Height + layer.OffsetY > layer.MaxHeight)
+                    {
+                        throw new InvalidOperationException("Layers must not extend beyond canvas borders");
+                    }
+
                     for (int y = 0; y < layers[i].Height; y++)
                     {
                         for (int x = 0; x < layers[i].Width; x++)
@@ -81,7 +88,7 @@ namespace PixiEditor.Models.ImageManipulation
             return finalBitmap;
         }
 
-      /// <summary>
+        /// <summary>
         /// Generates simplified preview from Document, very fast, great for creating small previews. Creates uniform streched image.
         /// </summary>
         /// <param name="document">Document which be used to generate preview.</param>
@@ -118,7 +125,7 @@ namespace PixiEditor.Models.ImageManipulation
 
         public static Dictionary<Guid, Color[]> GetPixelsForSelection(Layer[] layers, Coordinates[] selection)
         {
-            Dictionary<Guid, Color[]> result = new ();
+            Dictionary<Guid, Color[]> result = new();
 
             foreach (Layer layer in layers)
             {
@@ -187,4 +194,4 @@ namespace PixiEditor.Models.ImageManipulation
             return previewBitmap.Resize(newWidth, newHeight, WriteableBitmapExtensions.Interpolation.NearestNeighbor);
         }
     }
-}
+}

+ 14 - 14
PixiEditor/Models/Layers/Layer.cs

@@ -1,14 +1,14 @@
-using System;
+using PixiEditor.Models.DataHolders;
+using PixiEditor.Models.Position;
+using PixiEditor.Models.Undo;
+using PixiEditor.ViewModels;
+using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Linq;
 using System.Windows;
 using System.Windows.Media;
 using System.Windows.Media.Imaging;
-using PixiEditor.Models.DataHolders;
-using PixiEditor.Models.Position;
-using PixiEditor.Models.Undo;
-using PixiEditor.ViewModels;
 
 namespace PixiEditor.Models.Layers
 {
@@ -367,14 +367,14 @@ namespace PixiEditor.Models.Layers
 
             if (!(pixels.WasBuiltAsSingleColored && pixels.ChangedPixels.First().Value.A == 0))
             {
-                if (newMaxX + 1 > Width || newMaxY + 1 > Height)
+                if ((newMaxX + 1 > Width && Width < MaxWidth) || (newMaxY + 1 > Height && Height < MaxHeight))
                 {
-                    IncreaseSizeToBottom(newMaxX, newMaxY);
+                    IncreaseSizeToBottomAndRight(newMaxX, newMaxY);
                 }
 
-                if (newMinX < 0 || newMinY < 0)
+                if ((newMinX < 0 && Width < MaxWidth) || (newMinY < 0 && Height < MaxHeight))
                 {
-                    IncreaseSizeToTop(newMinX, newMinY);
+                    IncreaseSizeToTopAndLeft(newMinX, newMinY);
                 }
             }
 
@@ -493,7 +493,7 @@ namespace PixiEditor.Models.Layers
             }
         }
 
-        private void IncreaseSizeToBottom(int newMaxX, int newMaxY)
+        private void IncreaseSizeToBottomAndRight(int newMaxX, int newMaxY)
         {
             if (MaxWidth - OffsetX < 0 || MaxHeight - OffsetY < 0)
             {
@@ -506,7 +506,7 @@ namespace PixiEditor.Models.Layers
             ResizeCanvas(0, 0, 0, 0, newMaxX, newMaxY);
         }
 
-        private void IncreaseSizeToTop(int newMinX, int newMinY)
+        private void IncreaseSizeToTopAndLeft(int newMinX, int newMinY)
         {
             newMinX = Math.Clamp(Math.Min(newMinX, Width), Math.Min(-OffsetX, OffsetX), 0);
             newMinY = Math.Clamp(Math.Min(newMinY, Height), Math.Min(-OffsetY, OffsetY), 0);
@@ -538,8 +538,8 @@ namespace PixiEditor.Models.Layers
         {
             if (Width == 0 || Height == 0)
             {
-                int offsetX = pixels.ChangedPixels.Min(x => x.Key.X);
-                int offsetY = pixels.ChangedPixels.Min(x => x.Key.Y);
+                int offsetX = Math.Max(pixels.ChangedPixels.Min(x => x.Key.X), 0);
+                int offsetY = Math.Max(pixels.ChangedPixels.Min(x => x.Key.Y), 0);
                 Offset = new Thickness(offsetX, offsetY, 0, 0);
             }
         }
@@ -571,4 +571,4 @@ namespace PixiEditor.Models.Layers
             }
         }
     }
-}
+}

+ 4 - 4
PixiEditor/Models/Processes/ProcessHelper.cs

@@ -15,12 +15,12 @@ namespace PixiEditor.Models.Processes
                 proc.StartInfo.UseShellExecute = true;
                 proc.Start();
             }
-            catch (Win32Exception ex)
+            catch (Win32Exception)
             {
-                throw ex;
+                throw;
             }
-
+
             return proc;
         }
     }
-}
+}

+ 8 - 10
PixiEditor/Models/Tools/Tools/PenTool.cs

@@ -1,11 +1,4 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-using System.Windows.Input;
-using System.Windows.Media;
-using PixiEditor.Helpers.Extensions;
-using PixiEditor.Models.Controllers;
+using PixiEditor.Helpers.Extensions;
 using PixiEditor.Models.DataHolders;
 using PixiEditor.Models.Layers;
 using PixiEditor.Models.Position;
@@ -13,6 +6,11 @@ using PixiEditor.Models.Tools.ToolSettings;
 using PixiEditor.Models.Tools.ToolSettings.Settings;
 using PixiEditor.Models.Tools.ToolSettings.Toolbars;
 using PixiEditor.ViewModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows.Input;
+using System.Windows.Media;
 
 namespace PixiEditor.Models.Tools.Tools
 {
@@ -21,8 +19,8 @@ namespace PixiEditor.Models.Tools.Tools
         private readonly SizeSetting toolSizeSetting;
         private readonly BoolSetting pixelPerfectSetting;
         private readonly LineTool lineTool;
-        private Coordinates[] lastChangedPixels = new Coordinates[3];
         private readonly List<Coordinates> confirmedPixels = new List<Coordinates>();
+        private Coordinates[] lastChangedPixels = new Coordinates[3];
         private byte changedPixelsindex = 0;
 
         public PenTool()
@@ -146,4 +144,4 @@ namespace PixiEditor.Models.Tools.Tools
             RequiresPreviewLayer = e.NewValue;
         }
     }
-}
+}

+ 4 - 4
PixiEditor/PixiEditor.csproj

@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
+<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
     <OutputType>WinExe</OutputType>
@@ -67,7 +67,7 @@
     <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
     <PackageReference Include="MvvmLightLibs" Version="5.4.1.1" />
     <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
-    <PackageReference Include="PixiEditor.ColorPicker" Version="2.0.0" />
+    <PackageReference Include="PixiEditor.ColorPicker" Version="3.1.0" />
     <PackageReference Include="PixiEditor.Parser" Version="1.0.1.1" />
     <PackageReference Include="WriteableBitmapEx">
       <Version>1.6.7</Version>
@@ -120,5 +120,5 @@
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>
     </None>
   </ItemGroup>
-  
-</Project>
+
+</Project>

+ 6 - 6
PixiEditor/Styles/AvalonDock/NamespaceDoc.cs

@@ -1,8 +1,8 @@
-namespace PixiEditor.Styles.AvalonDock
+namespace PixiEditor.Styles.AvalonDock
 {
-	/// <summary>This library defines the VS2013 theme for AvalonDock.</summary>
-	[System.Runtime.CompilerServices.CompilerGenerated]
-	internal class NamespaceDoc
-	{
-	}
+    /// <summary>This library defines the VS2013 theme for AvalonDock.</summary>
+    [System.Runtime.CompilerServices.CompilerGenerated]
+    internal class NamespaceDoc
+    {
+    }
 }

+ 6 - 6
PixiEditor/Styles/AvalonDock/Themes/Menu/NamespaceDoc.cs

@@ -1,8 +1,8 @@
-namespace PixiEditor.Styles.AvalonDock.Themes.Menu
+namespace PixiEditor.Styles.AvalonDock.Themes.Menu
 {
-	/// <summary>This namespace defines the themed menu specific items for this theme in AvalonDock.</summary>
-	[System.Runtime.CompilerServices.CompilerGenerated]
-	internal class NamespaceDoc
-	{
-	}
+    /// <summary>This namespace defines the themed menu specific items for this theme in AvalonDock.</summary>
+    [System.Runtime.CompilerServices.CompilerGenerated]
+    internal class NamespaceDoc
+    {
+    }
 }

+ 4 - 4
PixiEditor/Styles/AvalonDock/Themes/NamespaceDoc.cs

@@ -1,8 +1,8 @@
-namespace PixiEditor.Styles.AvalonDock.Themes
+namespace PixiEditor.Styles.AvalonDock.Themes
 {
     /// <summary>This namespace defines the theme specific resources for this theme in AvalonDock.</summary>
     [System.Runtime.CompilerServices.CompilerGenerated]
-	internal class NamespaceDoc
-	{
-	}
+    internal class NamespaceDoc
+    {
+    }
 }

+ 175 - 174
PixiEditor/Styles/AvalonDock/Themes/ResourceKeys.cs

@@ -1,180 +1,181 @@
-using System.Windows;
+using System.Windows;
 
 namespace PixiEditor.Styles.AvalonDock.Themes
 {
     /// <summary>
-	/// Resource key management class to keep track of all resources
+    /// Resource key management class to keep track of all resources
     /// that can be re-styled in applications that make use of the implemented controls.
-	/// </summary>
-	public static class ResourceKeys
-	{
-		#region Accent Keys
-		/// <summary>
+    /// </summary>
+    public static class ResourceKeys
+    {
+        #region Accent Keys
+
+        /// <summary>
         /// Accent Color Key - This Color key is used to accent elements in the UI
-		/// (e.g.: Color of Activated Normal Window Frame, ResizeGrip, Focus or MouseOver input elements)
-		/// </summary>
-		public static readonly ComponentResourceKey ControlAccentColorKey = new ComponentResourceKey(typeof(ResourceKeys), "ControlAccentColorKey");
-
-		/// <summary>
-		/// Accent Brush Key - This Brush key is used to accent elements in the UI
-		/// (e.g.: Color of Activated Normal Window Frame, ResizeGrip, Focus or MouseOver input elements)
-		/// </summary>
-		public static readonly ComponentResourceKey ControlAccentBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "ControlAccentBrushKey");
-		#endregion Accent Keys
-
-		#region Brush Keys
-		// General
-		public static readonly ComponentResourceKey Background = new ComponentResourceKey(typeof(ResourceKeys), "Background");
-		public static readonly ComponentResourceKey PanelBorderBrush = new ComponentResourceKey(typeof(ResourceKeys), "PanelBorderBrush");
-		public static readonly ComponentResourceKey TabBackground = new ComponentResourceKey(typeof(ResourceKeys), "TabBackground");
-
-		// Auto Hide : Tab
-		public static readonly ComponentResourceKey AutoHideTabDefaultBackground = new ComponentResourceKey(typeof(ResourceKeys), "AutoHideTabDefaultBackground");
-		public static readonly ComponentResourceKey AutoHideTabDefaultBorder = new ComponentResourceKey(typeof(ResourceKeys), "AutoHideTabDefaultBorder");
-		public static readonly ComponentResourceKey AutoHideTabDefaultText = new ComponentResourceKey(typeof(ResourceKeys), "AutoHideTabDefaultText");
-
-		// Mouse Over Auto Hide Button for (collapsed) Auto Hidden Elements
-		public static readonly ComponentResourceKey AutoHideTabHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "AutoHideTabHoveredBackground");
-		// AccentColor
-		public static readonly ComponentResourceKey AutoHideTabHoveredBorder = new ComponentResourceKey(typeof(ResourceKeys), "AutoHideTabHoveredBorder");
-		// AccentColor
-		public static readonly ComponentResourceKey AutoHideTabHoveredText = new ComponentResourceKey(typeof(ResourceKeys), "AutoHideTabHoveredText");
-
-		// Document Well : Overflow Button
-		public static readonly ComponentResourceKey DocumentWellOverflowButtonDefaultGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellOverflowButtonDefaultGlyph");
-		public static readonly ComponentResourceKey DocumentWellOverflowButtonHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellOverflowButtonHoveredBackground");
-		public static readonly ComponentResourceKey DocumentWellOverflowButtonHoveredBorder = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellOverflowButtonHoveredBorder");
-		// AccentColor
-		public static readonly ComponentResourceKey DocumentWellOverflowButtonHoveredGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellOverflowButtonHoveredGlyph");
-		// AccentColor
-		public static readonly ComponentResourceKey DocumentWellOverflowButtonPressedBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellOverflowButtonPressedBackground");
-		public static readonly ComponentResourceKey DocumentWellOverflowButtonPressedBorder = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellOverflowButtonPressedBorder");
-		public static readonly ComponentResourceKey DocumentWellOverflowButtonPressedGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellOverflowButtonPressedGlyph");
-
-		// Document Well : Tab
-		// Selected Document Highlight Header Top color (AccentColor)
-		public static readonly ComponentResourceKey DocumentWellTabSelectedActiveBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabSelectedActiveBackground");
-
-		public static readonly ComponentResourceKey DocumentWellTabSelectedActiveText = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabSelectedActiveText");
-		public static readonly ComponentResourceKey DocumentWellTabSelectedInactiveBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabSelectedInactiveBackground");
-		public static readonly ComponentResourceKey DocumentWellTabSelectedInactiveText = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabSelectedInactiveText");
-		public static readonly ComponentResourceKey DocumentWellTabUnselectedBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabUnselectedBackground");
-		public static readonly ComponentResourceKey DocumentWellTabUnselectedText = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabUnselectedText");
-		// AccentColor
-		public static readonly ComponentResourceKey DocumentWellTabUnselectedHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabUnselectedHoveredBackground");
-		public static readonly ComponentResourceKey DocumentWellTabUnselectedHoveredText = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabUnselectedHoveredText");
-
-		// Document Well : Tab : Button
-		public static readonly ComponentResourceKey DocumentWellTabButtonSelectedActiveGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedActiveGlyph");
-
-		// AccentColor
-		public static readonly ComponentResourceKey DocumentWellTabButtonSelectedActiveHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedActiveHoveredBackground");
-		// AccentColor
-		public static readonly ComponentResourceKey DocumentWellTabButtonSelectedActiveHoveredBorder = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedActiveHoveredBorder");
-		public static readonly ComponentResourceKey DocumentWellTabButtonSelectedActiveHoveredGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedActiveHoveredGlyph");
-		// AccentColor
-		public static readonly ComponentResourceKey DocumentWellTabButtonSelectedActivePressedBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedActivePressedBackground");
-		// AccentColor
-		public static readonly ComponentResourceKey DocumentWellTabButtonSelectedActivePressedBorder = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedActivePressedBorder");
-		public static readonly ComponentResourceKey DocumentWellTabButtonSelectedActivePressedGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedActivePressedGlyph");
-		public static readonly ComponentResourceKey DocumentWellTabButtonSelectedInactiveGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedInactiveGlyph");
-		public static readonly ComponentResourceKey DocumentWellTabButtonSelectedInactiveHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedInactiveHoveredBackground");
-		public static readonly ComponentResourceKey DocumentWellTabButtonSelectedInactiveHoveredBorder = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedInactiveHoveredBorder");
-		public static readonly ComponentResourceKey DocumentWellTabButtonSelectedInactiveHoveredGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedInactiveHoveredGlyph");
-		public static readonly ComponentResourceKey DocumentWellTabButtonSelectedInactivePressedBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedInactivePressedBackground");
-		public static readonly ComponentResourceKey DocumentWellTabButtonSelectedInactivePressedBorder = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedInactivePressedBorder");
-		public static readonly ComponentResourceKey DocumentWellTabButtonSelectedInactivePressedGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedInactivePressedGlyph");
-		public static readonly ComponentResourceKey DocumentWellTabButtonUnselectedTabHoveredGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonUnselectedTabHoveredGlyph");
-		// AccentColor
-		public static readonly ComponentResourceKey DocumentWellTabButtonUnselectedTabHoveredButtonHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonUnselectedTabHoveredButtonHoveredBackground");
-		// AccentColor
-		public static readonly ComponentResourceKey DocumentWellTabButtonUnselectedTabHoveredButtonHoveredBorder = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonUnselectedTabHoveredButtonHoveredBorder");
-		public static readonly ComponentResourceKey DocumentWellTabButtonUnselectedTabHoveredButtonHoveredGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonUnselectedTabHoveredButtonHoveredGlyph");
-		// AccentColor
-		public static readonly ComponentResourceKey DocumentWellTabButtonUnselectedTabHoveredButtonPressedBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonUnselectedTabHoveredButtonPressedBackground");
-		// AccentColor
-		public static readonly ComponentResourceKey DocumentWellTabButtonUnselectedTabHoveredButtonPressedBorder = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonUnselectedTabHoveredButtonPressedBorder");
-		public static readonly ComponentResourceKey DocumentWellTabButtonUnselectedTabHoveredButtonPressedGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonUnselectedTabHoveredButtonPressedGlyph");
-
-		// Tool Window : Caption
-		// Background of selected toolwindow (AccentColor)
-		public static readonly ComponentResourceKey ToolWindowCaptionActiveBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionActiveBackground");
-		public static readonly ComponentResourceKey ToolWindowCaptionActiveGrip = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionActiveGrip");
-		public static readonly ComponentResourceKey ToolWindowCaptionActiveText = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionActiveText");
-		public static readonly ComponentResourceKey ToolWindowCaptionInactiveBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionInactiveBackground");
-		public static readonly ComponentResourceKey ToolWindowCaptionInactiveGrip = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionInactiveGrip");
-		public static readonly ComponentResourceKey ToolWindowCaptionInactiveText = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionInactiveText");
-
-		// Tool Window : Caption : Button
-		public static readonly ComponentResourceKey ToolWindowCaptionButtonActiveGlyph = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonActiveGlyph");
-		// AccentColor
-		public static readonly ComponentResourceKey ToolWindowCaptionButtonActiveHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonActiveHoveredBackground");
-		// AccentColor
-		public static readonly ComponentResourceKey ToolWindowCaptionButtonActiveHoveredBorder = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonActiveHoveredBorder");
-		public static readonly ComponentResourceKey ToolWindowCaptionButtonActiveHoveredGlyph = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonActiveHoveredGlyph");
-		// AccentColor
-		public static readonly ComponentResourceKey ToolWindowCaptionButtonActivePressedBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonActivePressedBackground");
-		// AccentColor
-		public static readonly ComponentResourceKey ToolWindowCaptionButtonActivePressedBorder = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonActivePressedBorder");
-
-		public static readonly ComponentResourceKey ToolWindowCaptionButtonActivePressedGlyph = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonActivePressedGlyph");
-		public static readonly ComponentResourceKey ToolWindowCaptionButtonInactiveGlyph = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonInactiveGlyph");
-
-		// AccentColor
-		public static readonly ComponentResourceKey ToolWindowCaptionButtonInactiveHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonInactiveHoveredBackground");
-		public static readonly ComponentResourceKey ToolWindowCaptionButtonInactiveHoveredBorder = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonInactiveHoveredBorder");
-		public static readonly ComponentResourceKey ToolWindowCaptionButtonInactiveHoveredGlyph = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonInactiveHoveredGlyph");
-
-		public static readonly ComponentResourceKey ToolWindowCaptionButtonInactivePressedBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonInactivePressedBackground");
-		public static readonly ComponentResourceKey ToolWindowCaptionButtonInactivePressedBorder = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonInactivePressedBorder");
-		public static readonly ComponentResourceKey ToolWindowCaptionButtonInactivePressedGlyph = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonInactivePressedGlyph");
-
-		// Tool Window : Tab
-		public static readonly ComponentResourceKey ToolWindowTabSelectedActiveBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowTabSelectedActiveBackground");
-		// AccentColor
-		public static readonly ComponentResourceKey ToolWindowTabSelectedActiveText = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowTabSelectedActiveText");
-		public static readonly ComponentResourceKey ToolWindowTabSelectedInactiveBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowTabSelectedInactiveBackground");
-		// AccentColor
-		public static readonly ComponentResourceKey ToolWindowTabSelectedInactiveText = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowTabSelectedInactiveText");
-		public static readonly ComponentResourceKey ToolWindowTabUnselectedBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowTabUnselectedBackground");
-		public static readonly ComponentResourceKey ToolWindowTabUnselectedText = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowTabUnselectedText");
-		public static readonly ComponentResourceKey ToolWindowTabUnselectedHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowTabUnselectedHoveredBackground");
-		// AccentColor
-		public static readonly ComponentResourceKey ToolWindowTabUnselectedHoveredText = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowTabUnselectedHoveredText");
-
-		// Floating Document Window
-		public static readonly ComponentResourceKey FloatingDocumentWindowBackground = new ComponentResourceKey(typeof(ResourceKeys), "FloatingDocumentWindowBackground");
-		public static readonly ComponentResourceKey FloatingDocumentWindowBorder = new ComponentResourceKey(typeof(ResourceKeys), "FloatingDocumentWindowBorder");
-
-		// Floating Tool Window
-		public static readonly ComponentResourceKey FloatingToolWindowBackground = new ComponentResourceKey(typeof(ResourceKeys), "FloatingToolWindowBackground");
-		public static readonly ComponentResourceKey FloatingToolWindowBorder = new ComponentResourceKey(typeof(ResourceKeys), "FloatingToolWindowBorder");
-
-		// Navigator Window
-		public static readonly ComponentResourceKey NavigatorWindowBackground = new ComponentResourceKey(typeof(ResourceKeys), "NavigatorWindowBackground");
-		public static readonly ComponentResourceKey NavigatorWindowForeground = new ComponentResourceKey(typeof(ResourceKeys), "NavigatorWindowForeground");
-
-		// Background of selected text in Navigator Window (AccentColor)
-		public static readonly ComponentResourceKey NavigatorWindowSelectedBackground = new ComponentResourceKey(typeof(ResourceKeys), "NavigatorWindowSelectedBackground");
-		public static readonly ComponentResourceKey NavigatorWindowSelectedText = new ComponentResourceKey(typeof(ResourceKeys), "NavigatorWindowSelectedText");
-
-		#region DockingBrushKeys
-		// Defines the height and width of the docking indicator buttons that are shown when
-		// documents or tool windows are dragged
-		public static readonly ComponentResourceKey DockingButtonWidthKey = new ComponentResourceKey(typeof(ResourceKeys), "DockingButtonWidthKey");
-		public static readonly ComponentResourceKey DockingButtonHeightKey = new ComponentResourceKey(typeof(ResourceKeys), "DockingButtonHeightKey");
-
-		public static readonly ComponentResourceKey DockingButtonBackgroundBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "DockingButtonBackgroundBrushKey");
-		public static readonly ComponentResourceKey DockingButtonForegroundBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "DockingButtonForegroundBrushKey");
-		public static readonly ComponentResourceKey DockingButtonForegroundArrowBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "DockingButtonForegroundArrowBrushKey");
-
-		public static readonly ComponentResourceKey DockingButtonStarBorderBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "DockingButtonStarBorderBrushKey");
-		public static readonly ComponentResourceKey DockingButtonStarBackgroundBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "DockingButtonStarBackgroundBrushKey");
-
-		// Preview Box is the highlighted rectangle that shows when a drop area in a window is indicated
-		public static readonly ComponentResourceKey PreviewBoxBorderBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "PreviewBoxBorderBrushKey");
-		public static readonly ComponentResourceKey PreviewBoxBackgroundBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "PreviewBoxBackgroundBrushKey");
-		#endregion DockingBrushKeys
-		#endregion Brush Keys
-	}
-}
+        /// (e.g.: Color of Activated Normal Window Frame, ResizeGrip, Focus or MouseOver input elements)
+        /// </summary>
+        public static readonly ComponentResourceKey ControlAccentColorKey = new ComponentResourceKey(typeof(ResourceKeys), "ControlAccentColorKey");
+
+        /// <summary>
+        /// Accent Brush Key - This Brush key is used to accent elements in the UI
+        /// (e.g.: Color of Activated Normal Window Frame, ResizeGrip, Focus or MouseOver input elements)
+        /// </summary>
+        public static readonly ComponentResourceKey ControlAccentBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "ControlAccentBrushKey");
+        #endregion Accent Keys
+
+        #region Brush Keys
+        // General
+        public static readonly ComponentResourceKey Background = new ComponentResourceKey(typeof(ResourceKeys), "Background");
+        public static readonly ComponentResourceKey PanelBorderBrush = new ComponentResourceKey(typeof(ResourceKeys), "PanelBorderBrush");
+        public static readonly ComponentResourceKey TabBackground = new ComponentResourceKey(typeof(ResourceKeys), "TabBackground");
+
+        // Auto Hide : Tab
+        public static readonly ComponentResourceKey AutoHideTabDefaultBackground = new ComponentResourceKey(typeof(ResourceKeys), "AutoHideTabDefaultBackground");
+        public static readonly ComponentResourceKey AutoHideTabDefaultBorder = new ComponentResourceKey(typeof(ResourceKeys), "AutoHideTabDefaultBorder");
+        public static readonly ComponentResourceKey AutoHideTabDefaultText = new ComponentResourceKey(typeof(ResourceKeys), "AutoHideTabDefaultText");
+
+        // Mouse Over Auto Hide Button for (collapsed) Auto Hidden Elements
+        public static readonly ComponentResourceKey AutoHideTabHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "AutoHideTabHoveredBackground");
+        // AccentColor
+        public static readonly ComponentResourceKey AutoHideTabHoveredBorder = new ComponentResourceKey(typeof(ResourceKeys), "AutoHideTabHoveredBorder");
+        // AccentColor
+        public static readonly ComponentResourceKey AutoHideTabHoveredText = new ComponentResourceKey(typeof(ResourceKeys), "AutoHideTabHoveredText");
+
+        // Document Well : Overflow Button
+        public static readonly ComponentResourceKey DocumentWellOverflowButtonDefaultGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellOverflowButtonDefaultGlyph");
+        public static readonly ComponentResourceKey DocumentWellOverflowButtonHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellOverflowButtonHoveredBackground");
+        public static readonly ComponentResourceKey DocumentWellOverflowButtonHoveredBorder = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellOverflowButtonHoveredBorder");
+        // AccentColor
+        public static readonly ComponentResourceKey DocumentWellOverflowButtonHoveredGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellOverflowButtonHoveredGlyph");
+        // AccentColor
+        public static readonly ComponentResourceKey DocumentWellOverflowButtonPressedBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellOverflowButtonPressedBackground");
+        public static readonly ComponentResourceKey DocumentWellOverflowButtonPressedBorder = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellOverflowButtonPressedBorder");
+        public static readonly ComponentResourceKey DocumentWellOverflowButtonPressedGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellOverflowButtonPressedGlyph");
+
+        // Document Well : Tab
+        // Selected Document Highlight Header Top color (AccentColor)
+        public static readonly ComponentResourceKey DocumentWellTabSelectedActiveBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabSelectedActiveBackground");
+
+        public static readonly ComponentResourceKey DocumentWellTabSelectedActiveText = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabSelectedActiveText");
+        public static readonly ComponentResourceKey DocumentWellTabSelectedInactiveBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabSelectedInactiveBackground");
+        public static readonly ComponentResourceKey DocumentWellTabSelectedInactiveText = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabSelectedInactiveText");
+        public static readonly ComponentResourceKey DocumentWellTabUnselectedBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabUnselectedBackground");
+        public static readonly ComponentResourceKey DocumentWellTabUnselectedText = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabUnselectedText");
+        // AccentColor
+        public static readonly ComponentResourceKey DocumentWellTabUnselectedHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabUnselectedHoveredBackground");
+        public static readonly ComponentResourceKey DocumentWellTabUnselectedHoveredText = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabUnselectedHoveredText");
+
+        // Document Well : Tab : Button
+        public static readonly ComponentResourceKey DocumentWellTabButtonSelectedActiveGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedActiveGlyph");
+
+        // AccentColor
+        public static readonly ComponentResourceKey DocumentWellTabButtonSelectedActiveHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedActiveHoveredBackground");
+        // AccentColor
+        public static readonly ComponentResourceKey DocumentWellTabButtonSelectedActiveHoveredBorder = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedActiveHoveredBorder");
+        public static readonly ComponentResourceKey DocumentWellTabButtonSelectedActiveHoveredGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedActiveHoveredGlyph");
+        // AccentColor
+        public static readonly ComponentResourceKey DocumentWellTabButtonSelectedActivePressedBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedActivePressedBackground");
+        // AccentColor
+        public static readonly ComponentResourceKey DocumentWellTabButtonSelectedActivePressedBorder = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedActivePressedBorder");
+        public static readonly ComponentResourceKey DocumentWellTabButtonSelectedActivePressedGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedActivePressedGlyph");
+        public static readonly ComponentResourceKey DocumentWellTabButtonSelectedInactiveGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedInactiveGlyph");
+        public static readonly ComponentResourceKey DocumentWellTabButtonSelectedInactiveHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedInactiveHoveredBackground");
+        public static readonly ComponentResourceKey DocumentWellTabButtonSelectedInactiveHoveredBorder = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedInactiveHoveredBorder");
+        public static readonly ComponentResourceKey DocumentWellTabButtonSelectedInactiveHoveredGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedInactiveHoveredGlyph");
+        public static readonly ComponentResourceKey DocumentWellTabButtonSelectedInactivePressedBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedInactivePressedBackground");
+        public static readonly ComponentResourceKey DocumentWellTabButtonSelectedInactivePressedBorder = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedInactivePressedBorder");
+        public static readonly ComponentResourceKey DocumentWellTabButtonSelectedInactivePressedGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonSelectedInactivePressedGlyph");
+        public static readonly ComponentResourceKey DocumentWellTabButtonUnselectedTabHoveredGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonUnselectedTabHoveredGlyph");
+        // AccentColor
+        public static readonly ComponentResourceKey DocumentWellTabButtonUnselectedTabHoveredButtonHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonUnselectedTabHoveredButtonHoveredBackground");
+        // AccentColor
+        public static readonly ComponentResourceKey DocumentWellTabButtonUnselectedTabHoveredButtonHoveredBorder = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonUnselectedTabHoveredButtonHoveredBorder");
+        public static readonly ComponentResourceKey DocumentWellTabButtonUnselectedTabHoveredButtonHoveredGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonUnselectedTabHoveredButtonHoveredGlyph");
+        // AccentColor
+        public static readonly ComponentResourceKey DocumentWellTabButtonUnselectedTabHoveredButtonPressedBackground = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonUnselectedTabHoveredButtonPressedBackground");
+        // AccentColor
+        public static readonly ComponentResourceKey DocumentWellTabButtonUnselectedTabHoveredButtonPressedBorder = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonUnselectedTabHoveredButtonPressedBorder");
+        public static readonly ComponentResourceKey DocumentWellTabButtonUnselectedTabHoveredButtonPressedGlyph = new ComponentResourceKey(typeof(ResourceKeys), "DocumentWellTabButtonUnselectedTabHoveredButtonPressedGlyph");
+
+        // Tool Window : Caption
+        // Background of selected toolwindow (AccentColor)
+        public static readonly ComponentResourceKey ToolWindowCaptionActiveBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionActiveBackground");
+        public static readonly ComponentResourceKey ToolWindowCaptionActiveGrip = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionActiveGrip");
+        public static readonly ComponentResourceKey ToolWindowCaptionActiveText = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionActiveText");
+        public static readonly ComponentResourceKey ToolWindowCaptionInactiveBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionInactiveBackground");
+        public static readonly ComponentResourceKey ToolWindowCaptionInactiveGrip = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionInactiveGrip");
+        public static readonly ComponentResourceKey ToolWindowCaptionInactiveText = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionInactiveText");
+
+        // Tool Window : Caption : Button
+        public static readonly ComponentResourceKey ToolWindowCaptionButtonActiveGlyph = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonActiveGlyph");
+        // AccentColor
+        public static readonly ComponentResourceKey ToolWindowCaptionButtonActiveHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonActiveHoveredBackground");
+        // AccentColor
+        public static readonly ComponentResourceKey ToolWindowCaptionButtonActiveHoveredBorder = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonActiveHoveredBorder");
+        public static readonly ComponentResourceKey ToolWindowCaptionButtonActiveHoveredGlyph = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonActiveHoveredGlyph");
+        // AccentColor
+        public static readonly ComponentResourceKey ToolWindowCaptionButtonActivePressedBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonActivePressedBackground");
+        // AccentColor
+        public static readonly ComponentResourceKey ToolWindowCaptionButtonActivePressedBorder = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonActivePressedBorder");
+
+        public static readonly ComponentResourceKey ToolWindowCaptionButtonActivePressedGlyph = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonActivePressedGlyph");
+        public static readonly ComponentResourceKey ToolWindowCaptionButtonInactiveGlyph = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonInactiveGlyph");
+
+        // AccentColor
+        public static readonly ComponentResourceKey ToolWindowCaptionButtonInactiveHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonInactiveHoveredBackground");
+        public static readonly ComponentResourceKey ToolWindowCaptionButtonInactiveHoveredBorder = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonInactiveHoveredBorder");
+        public static readonly ComponentResourceKey ToolWindowCaptionButtonInactiveHoveredGlyph = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonInactiveHoveredGlyph");
+
+        public static readonly ComponentResourceKey ToolWindowCaptionButtonInactivePressedBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonInactivePressedBackground");
+        public static readonly ComponentResourceKey ToolWindowCaptionButtonInactivePressedBorder = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonInactivePressedBorder");
+        public static readonly ComponentResourceKey ToolWindowCaptionButtonInactivePressedGlyph = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowCaptionButtonInactivePressedGlyph");
+
+        // Tool Window : Tab
+        public static readonly ComponentResourceKey ToolWindowTabSelectedActiveBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowTabSelectedActiveBackground");
+        // AccentColor
+        public static readonly ComponentResourceKey ToolWindowTabSelectedActiveText = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowTabSelectedActiveText");
+        public static readonly ComponentResourceKey ToolWindowTabSelectedInactiveBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowTabSelectedInactiveBackground");
+        // AccentColor
+        public static readonly ComponentResourceKey ToolWindowTabSelectedInactiveText = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowTabSelectedInactiveText");
+        public static readonly ComponentResourceKey ToolWindowTabUnselectedBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowTabUnselectedBackground");
+        public static readonly ComponentResourceKey ToolWindowTabUnselectedText = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowTabUnselectedText");
+        public static readonly ComponentResourceKey ToolWindowTabUnselectedHoveredBackground = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowTabUnselectedHoveredBackground");
+        // AccentColor
+        public static readonly ComponentResourceKey ToolWindowTabUnselectedHoveredText = new ComponentResourceKey(typeof(ResourceKeys), "ToolWindowTabUnselectedHoveredText");
+
+        // Floating Document Window
+        public static readonly ComponentResourceKey FloatingDocumentWindowBackground = new ComponentResourceKey(typeof(ResourceKeys), "FloatingDocumentWindowBackground");
+        public static readonly ComponentResourceKey FloatingDocumentWindowBorder = new ComponentResourceKey(typeof(ResourceKeys), "FloatingDocumentWindowBorder");
+
+        // Floating Tool Window
+        public static readonly ComponentResourceKey FloatingToolWindowBackground = new ComponentResourceKey(typeof(ResourceKeys), "FloatingToolWindowBackground");
+        public static readonly ComponentResourceKey FloatingToolWindowBorder = new ComponentResourceKey(typeof(ResourceKeys), "FloatingToolWindowBorder");
+
+        // Navigator Window
+        public static readonly ComponentResourceKey NavigatorWindowBackground = new ComponentResourceKey(typeof(ResourceKeys), "NavigatorWindowBackground");
+        public static readonly ComponentResourceKey NavigatorWindowForeground = new ComponentResourceKey(typeof(ResourceKeys), "NavigatorWindowForeground");
+
+        // Background of selected text in Navigator Window (AccentColor)
+        public static readonly ComponentResourceKey NavigatorWindowSelectedBackground = new ComponentResourceKey(typeof(ResourceKeys), "NavigatorWindowSelectedBackground");
+        public static readonly ComponentResourceKey NavigatorWindowSelectedText = new ComponentResourceKey(typeof(ResourceKeys), "NavigatorWindowSelectedText");
+
+        #region DockingBrushKeys
+        // Defines the height and width of the docking indicator buttons that are shown when
+        // documents or tool windows are dragged
+        public static readonly ComponentResourceKey DockingButtonWidthKey = new ComponentResourceKey(typeof(ResourceKeys), "DockingButtonWidthKey");
+        public static readonly ComponentResourceKey DockingButtonHeightKey = new ComponentResourceKey(typeof(ResourceKeys), "DockingButtonHeightKey");
+
+        public static readonly ComponentResourceKey DockingButtonBackgroundBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "DockingButtonBackgroundBrushKey");
+        public static readonly ComponentResourceKey DockingButtonForegroundBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "DockingButtonForegroundBrushKey");
+        public static readonly ComponentResourceKey DockingButtonForegroundArrowBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "DockingButtonForegroundArrowBrushKey");
+
+        public static readonly ComponentResourceKey DockingButtonStarBorderBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "DockingButtonStarBorderBrushKey");
+        public static readonly ComponentResourceKey DockingButtonStarBackgroundBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "DockingButtonStarBackgroundBrushKey");
+
+        // Preview Box is the highlighted rectangle that shows when a drop area in a window is indicated
+        public static readonly ComponentResourceKey PreviewBoxBorderBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "PreviewBoxBorderBrushKey");
+        public static readonly ComponentResourceKey PreviewBoxBackgroundBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "PreviewBoxBackgroundBrushKey");
+        #endregion DockingBrushKeys
+        #endregion Brush Keys
+    }
+}

+ 6 - 6
PixiEditor/ViewModels/ImportFilePopupViewModel.cs

@@ -1,10 +1,10 @@
-using System;
+using Microsoft.Win32;
+using PixiEditor.Exceptions;
+using PixiEditor.Helpers;
+using System;
 using System.IO;
 using System.Windows;
 using System.Windows.Media.Imaging;
-using Microsoft.Win32;
-using PixiEditor.Exceptions;
-using PixiEditor.Helpers;
 
 namespace PixiEditor.ViewModels
 {
@@ -154,7 +154,7 @@ namespace PixiEditor.ViewModels
 
         private void CloseWindow(object parameter)
         {
-            ((Window) parameter).DialogResult = false;
+            ((Window)parameter).DialogResult = false;
             CloseButton(parameter);
         }
 
@@ -165,7 +165,7 @@ namespace PixiEditor.ViewModels
 
         private void OkButton(object parameter)
         {
-            ((Window) parameter).DialogResult = true;
+            ((Window)parameter).DialogResult = true;
             CloseButton(parameter);
         }
 

+ 5 - 5
PixiEditor/ViewModels/SaveFilePopupViewModel.cs

@@ -1,6 +1,6 @@
-using System.Windows;
-using Microsoft.Win32;
+using Microsoft.Win32;
 using PixiEditor.Helpers;
+using System.Windows;
 
 namespace PixiEditor.ViewModels
 {
@@ -97,7 +97,7 @@ namespace PixiEditor.ViewModels
 
         private void CloseWindow(object parameter)
         {
-            ((Window) parameter).DialogResult = false;
+            ((Window)parameter).DialogResult = false;
             CloseButton(parameter);
         }
 
@@ -108,7 +108,7 @@ namespace PixiEditor.ViewModels
 
         private void OkButton(object parameter)
         {
-            ((Window) parameter).DialogResult = true;
+            ((Window)parameter).DialogResult = true;
             CloseButton(parameter);
         }
 
@@ -117,4 +117,4 @@ namespace PixiEditor.ViewModels
             return PathIsCorrect;
         }
     }
-}
+}

+ 1 - 1
PixiEditor/ViewModels/ViewModelBase.cs

@@ -16,7 +16,7 @@ namespace PixiEditor.ViewModels
 
         protected void CloseButton(object parameter)
         {
-            ((Window) parameter).Close();
+            ((Window)parameter).Close();
         }
 
         protected void DragMove(object parameter)

+ 6 - 6
PixiEditor/Views/Dialogs/ConfirmationPopup.xaml.cs

@@ -1,5 +1,5 @@
-using System.Windows;
-using PixiEditor.Helpers;
+using PixiEditor.Helpers;
+using System.Windows;
 
 namespace PixiEditor.Views
 {
@@ -30,20 +30,20 @@ namespace PixiEditor.Views
 
         public bool Result
         {
-            get => (bool) GetValue(SaveChangesProperty);
+            get => (bool)GetValue(SaveChangesProperty);
             set => SetValue(SaveChangesProperty, value);
         }
 
 
         public string Body
         {
-            get => (string) GetValue(BodyProperty);
+            get => (string)GetValue(BodyProperty);
             set => SetValue(BodyProperty, value);
         }
 
         private void SetResultAndClose(object property)
         {
-            bool result = (bool) property;
+            bool result = (bool)property;
             Result = result;
             DialogResult = true;
             Close();
@@ -55,4 +55,4 @@ namespace PixiEditor.Views
             Close();
         }
     }
-}
+}

+ 9 - 18
PixiEditor/Views/Dialogs/HelloTherePopup.xaml.cs

@@ -1,20 +1,11 @@
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
+using PixiEditor.Helpers;
+using PixiEditor.Models.DataHolders;
+using PixiEditor.ViewModels.SubViewModels.Main;
+using System;
 using System.Diagnostics;
-using System.IO;
-using System.Linq;
 using System.Reflection;
 using System.Windows;
 using System.Windows.Input;
-using Newtonsoft.Json.Linq;
-using PixiEditor.Helpers;
-using PixiEditor.Helpers.Extensions;
-using PixiEditor.Models.DataHolders;
-using PixiEditor.Models.Dialogs;
-using PixiEditor.Models.IO;
-using PixiEditor.Models.UserPreferences;
-using PixiEditor.ViewModels.SubViewModels.Main;
 
 namespace PixiEditor.Views.Dialogs
 {
@@ -28,15 +19,15 @@ namespace PixiEditor.Views.Dialogs
         public static readonly DependencyProperty FileViewModelProperty =
             DependencyProperty.Register(nameof(FileViewModel), typeof(FileViewModel), typeof(HelloTherePopup));
 
-        public FileViewModel FileViewModel { get => (FileViewModel)GetValue(FileViewModelProperty); set => SetValue(FileViewModelProperty, value); }
-
         public static readonly DependencyProperty RecentlyOpenedEmptyProperty =
             DependencyProperty.Register(nameof(RecentlyOpenedEmpty), typeof(bool), typeof(HelloTherePopup));
 
-        public bool RecentlyOpenedEmpty { get => (bool)GetValue(RecentlyOpenedEmptyProperty); set => SetValue(RecentlyOpenedEmptyProperty, value); }
-
         public static string VersionText { get => $"v{Assembly.GetExecutingAssembly().GetName().Version.Major}.{Assembly.GetExecutingAssembly().GetName().Version.Minor}"; }
 
+        public FileViewModel FileViewModel { get => (FileViewModel)GetValue(FileViewModelProperty); set => SetValue(FileViewModelProperty, value); }
+
+        public bool RecentlyOpenedEmpty { get => (bool)GetValue(RecentlyOpenedEmptyProperty); set => SetValue(RecentlyOpenedEmptyProperty, value); }
+
         public RelayCommand OpenFileCommand { get; set; }
 
         public RelayCommand OpenNewFileCommand { get; set; }
@@ -122,4 +113,4 @@ namespace PixiEditor.Views.Dialogs
             Close();
         }
     }
-}
+}

+ 6 - 6
PixiEditor/Views/Dialogs/ResizeCanvasPopup.xaml.cs

@@ -1,6 +1,6 @@
-using System.Windows;
+using PixiEditor.Models.Enums;
+using System.Windows;
 using System.Windows.Input;
-using PixiEditor.Models.Enums;
 
 namespace PixiEditor.Views
 {
@@ -30,21 +30,21 @@ namespace PixiEditor.Views
 
         public AnchorPoint SelectedAnchorPoint
         {
-            get => (AnchorPoint) GetValue(SelectedAnchorPointProperty);
+            get => (AnchorPoint)GetValue(SelectedAnchorPointProperty);
             set => SetValue(SelectedAnchorPointProperty, value);
         }
 
 
         public int NewHeight
         {
-            get => (int) GetValue(NewHeightProperty);
+            get => (int)GetValue(NewHeightProperty);
             set => SetValue(NewHeightProperty, value);
         }
 
 
         public int NewWidth
         {
-            get => (int) GetValue(NewWidthProperty);
+            get => (int)GetValue(NewWidthProperty);
             set => SetValue(NewWidthProperty, value);
         }
 
@@ -65,4 +65,4 @@ namespace PixiEditor.Views
             Close();
         }
     }
-}
+}

+ 3 - 5
PixiEditor/Views/Dialogs/ResizeDocumentPopup.xaml.cs

@@ -8,11 +8,9 @@ namespace PixiEditor.Views
     /// </summary>
     public partial class ResizeDocumentPopup : Window
     {
-        // Using a DependencyProperty as the backing store for NewHeight.  This enables animation, styling, binding, etc...
         public static readonly DependencyProperty NewHeightProperty =
             DependencyProperty.Register("NewHeight", typeof(int), typeof(ResizeDocumentPopup), new PropertyMetadata(0));
 
-        // Using a DependencyProperty as the backing store for NewWidth.  This enables animation, styling, binding, etc...
         public static readonly DependencyProperty NewWidthProperty =
             DependencyProperty.Register("NewWidth", typeof(int), typeof(ResizeDocumentPopup), new PropertyMetadata(0));
 
@@ -25,14 +23,14 @@ namespace PixiEditor.Views
 
         public int NewHeight
         {
-            get => (int) GetValue(NewHeightProperty);
+            get => (int)GetValue(NewHeightProperty);
             set => SetValue(NewHeightProperty, value);
         }
 
 
         public int NewWidth
         {
-            get => (int) GetValue(NewWidthProperty);
+            get => (int)GetValue(NewWidthProperty);
             set => SetValue(NewWidthProperty, value);
         }
 
@@ -53,4 +51,4 @@ namespace PixiEditor.Views
             Close();
         }
     }
-}
+}

+ 5 - 7
PixiEditor/Views/Dialogs/SaveFilePopup.xaml.cs

@@ -1,5 +1,5 @@
-using System.Windows;
-using PixiEditor.ViewModels;
+using PixiEditor.ViewModels;
+using System.Windows;
 
 namespace PixiEditor.Views
 {
@@ -8,12 +8,10 @@ namespace PixiEditor.Views
     /// </summary>
     public partial class SaveFilePopup : Window
     {
-        // Using a DependencyProperty as the backing store for SaveHeight.  This enables animation, styling, binding, etc...
         public static readonly DependencyProperty SaveHeightProperty =
             DependencyProperty.Register("SaveHeight", typeof(int), typeof(SaveFilePopup), new PropertyMetadata(32));
 
 
-        // Using a DependencyProperty as the backing store for SaveWidth.  This enables animation, styling, binding, etc...
         public static readonly DependencyProperty SaveWidthProperty =
             DependencyProperty.Register("SaveWidth", typeof(int), typeof(SaveFilePopup), new PropertyMetadata(32));
 
@@ -28,14 +26,14 @@ namespace PixiEditor.Views
 
         public int SaveWidth
         {
-            get => (int) GetValue(SaveWidthProperty);
+            get => (int)GetValue(SaveWidthProperty);
             set => SetValue(SaveWidthProperty, value);
         }
 
 
         public int SaveHeight
         {
-            get => (int) GetValue(SaveHeightProperty);
+            get => (int)GetValue(SaveHeightProperty);
             set => SetValue(SaveHeightProperty, value);
         }
 
@@ -45,4 +43,4 @@ namespace PixiEditor.Views
             set => dataContext.FilePath = value;
         }
     }
-}
+}

+ 79 - 68
PixiEditor/Views/MainWindow.xaml

@@ -1,4 +1,4 @@
-<Window x:Class="PixiEditor.MainWindow" MinHeight="500" MinWidth="1100"
+<Window x:Class="PixiEditor.MainWindow" MinHeight="500" MinWidth="1100"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
@@ -251,70 +251,81 @@
                         <LayoutPanel Orientation="Horizontal">
                             <LayoutDocumentPane/>
                             <LayoutAnchorablePaneGroup Orientation="Vertical" DockWidth="290">
-                                <LayoutAnchorablePane>
-                                <LayoutAnchorable ContentId="colorPicker" Title="Color Picker" CanHide="False"
-                                                             CanClose="False" CanAutoHide="False"
+                                <LayoutAnchorablePane x:Name="colorPane">
+                                    <LayoutAnchorable ContentId="colorPicker" Title="Color Picker" CanHide="False"
+                                                             CanClose="False" CanAutoHide="False" x:Name="colorPickerPanel"
                                                              CanDockAsTabbedDocument="False" CanFloat="True">
-                                    <colorpicker:StandardColorPicker Grid.Row="0" SelectedColor="{Binding ColorsSubViewModel.PrimaryColor, Mode=TwoWay}"
-                                     SecondaryColor="{Binding ColorsSubViewModel.SecondaryColor, Mode=TwoWay}" Style="{StaticResource DefaultColorPickerStyle}" >
-                                        <i:Interaction.Behaviors>
-                                            <behaviours:GlobalShortcutFocusBehavior/>
-                                        </i:Interaction.Behaviors>
-                                    </colorpicker:StandardColorPicker>
-                                </LayoutAnchorable>
-                                <avalondock:LayoutAnchorable ContentId="swatches" Title="Swatches" CanHide="False"
-                                                         CanClose="False" CanAutoHide="False"
-                                                         CanDockAsTabbedDocument="False" CanFloat="True">
-                                    <ScrollViewer HorizontalScrollBarVisibility="Disabled"
+                                        <usercontrols:SmallColorPicker SelectedColor="{Binding ColorsSubViewModel.PrimaryColor, Mode=TwoWay}"
+                                                                         SecondaryColor="{Binding ColorsSubViewModel.SecondaryColor, Mode=TwoWay}" 
+                                                                         Style="{StaticResource DefaultColorPickerStyle}" x:Name="mainColorPicker">
+                                            <i:Interaction.Behaviors>
+                                                <behaviours:GlobalShortcutFocusBehavior/>
+                                            </i:Interaction.Behaviors>
+                                        </usercontrols:SmallColorPicker>
+                                    </LayoutAnchorable>
+                                    <LayoutAnchorable ContentId="colorSliders" Title="Color Sliders" CanHide="False"
+                                                      CanClose="False" CanAutoHide="False" x:Name="colorSlidersPanel"
+                                                      CanDockAsTabbedDocument="False" CanFloat="True">
+                                        <colorpicker:ColorSliders Style="{StaticResource DefaultColorPickerStyle}" 
+                                                                  ColorState="{Binding ElementName=mainColorPicker, Path=ColorState, Delay=10, Mode=TwoWay}">
+                                            <i:Interaction.Behaviors>
+                                                <behaviours:GlobalShortcutFocusBehavior/>
+                                            </i:Interaction.Behaviors>
+                                        </colorpicker:ColorSliders>
+                                    </LayoutAnchorable>
+                                    <avalondock:LayoutAnchorable ContentId="swatches" Title="Swatches" CanHide="False"
+                                                                 CanClose="False" CanAutoHide="False"
+                                                                 CanDockAsTabbedDocument="False" CanFloat="True">
+                                        <ScrollViewer HorizontalScrollBarVisibility="Disabled"
                                               VerticalScrollBarVisibility="Auto">
-                                        <ItemsControl ItemsSource="{Binding BitmapManager.ActiveDocument.Swatches}">
-                                            <ItemsControl.ItemsPanel>
-                                                <ItemsPanelTemplate>
-                                                    <WrapPanel Margin="10,10,0,10" Orientation="Horizontal"
+                                            <ItemsControl ItemsSource="{Binding BitmapManager.ActiveDocument.Swatches}">
+                                                <ItemsControl.ItemsPanel>
+                                                    <ItemsPanelTemplate>
+                                                        <WrapPanel Margin="10,10,0,10" Orientation="Horizontal"
                                                            VerticalAlignment="Top" HorizontalAlignment="Left" />
-                                                </ItemsPanelTemplate>
-                                            </ItemsControl.ItemsPanel>
-                                            <ItemsControl.ItemTemplate>
-                                                <DataTemplate>
-                                                    <Grid Width="45" Height="45" Margin="0 5 5 5">
-                                                        <Border CornerRadius="5.5" Width="44" Height="44">
-                                                            <Border.Background>
-                                                                <ImageBrush ImageSource="../Images/transparentbg.png"
+                                                    </ItemsPanelTemplate>
+                                                </ItemsControl.ItemsPanel>
+                                                <ItemsControl.ItemTemplate>
+                                                    <DataTemplate>
+                                                        <Grid Width="45" Height="45" Margin="0 5 5 5">
+                                                            <Border CornerRadius="5.5" Width="44" Height="44">
+                                                                <Border.Background>
+                                                                    <ImageBrush ImageSource="../Images/transparentbg.png"
                                                                         Stretch="UniformToFill">
-                                                                    <ImageBrush.RelativeTransform>
-                                                                        <ScaleTransform ScaleX="6" ScaleY="6" CenterX="0.5"
+                                                                        <ImageBrush.RelativeTransform>
+                                                                            <ScaleTransform ScaleX="6" ScaleY="6" CenterX="0.5"
                                                                                     CenterY="0.5" />
-                                                                    </ImageBrush.RelativeTransform>
-                                                                </ImageBrush>
-                                                            </Border.Background>
-                                                        </Border>
-                                                        <Border CornerRadius="5.5" BorderThickness="0 0 0 0.1" BorderBrush="White" Cursor="Hand">
-                                                            <Border.Background>
-                                                                <SolidColorBrush Color="{Binding}" />
-                                                            </Border.Background>
-                                                        </Border>
-                                                        <i:Interaction.Triggers>
-                                                            <i:EventTrigger EventName="MouseDown">
-                                                                <i:InvokeCommandAction
+                                                                        </ImageBrush.RelativeTransform>
+                                                                    </ImageBrush>
+                                                                </Border.Background>
+                                                            </Border>
+                                                            <Border CornerRadius="5.5" BorderThickness="0 0 0 0.1" BorderBrush="White" Cursor="Hand">
+                                                                <Border.Background>
+                                                                    <SolidColorBrush Color="{Binding}" />
+                                                                </Border.Background>
+                                                            </Border>
+                                                            <i:Interaction.Triggers>
+                                                                <i:EventTrigger EventName="MouseDown">
+                                                                    <i:InvokeCommandAction
                                                                 Command="{Binding
                                                                     RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.ColorsSubViewModel.SelectColorCommand}"
                                                                 CommandParameter="{Binding}" />
-                                                            </i:EventTrigger>
-                                                        </i:Interaction.Triggers>
-                                                        <Grid.ContextMenu>
-                                                            <ContextMenu>
-                                                                <MenuItem Header="Remove" Foreground="White"
+                                                                </i:EventTrigger>
+                                                            </i:Interaction.Triggers>
+                                                            <Grid.ContextMenu>
+                                                                <ContextMenu>
+                                                                    <MenuItem Header="Remove" Foreground="White"
                                                                       Command="{Binding ColorsSubViewModel.RemoveSwatchCommand}"
                                                                       CommandParameter="{Binding}" />
-                                                            </ContextMenu>
-                                                        </Grid.ContextMenu>
-                                                    </Grid>
-                                                </DataTemplate>
-                                            </ItemsControl.ItemTemplate>
-                                        </ItemsControl>
-                                    </ScrollViewer>
-                                </avalondock:LayoutAnchorable>
-                            </LayoutAnchorablePane>
+                                                                </ContextMenu>
+                                                            </Grid.ContextMenu>
+                                                        </Grid>
+                                                    </DataTemplate>
+                                                </ItemsControl.ItemTemplate>
+                                            </ItemsControl>
+                                        </ScrollViewer>
+                                    </avalondock:LayoutAnchorable>
+                                </LayoutAnchorablePane>
                                 <LayoutAnchorablePane>
                                     <LayoutAnchorable ContentId="layers" Title="Layers" CanHide="False"
                                                          CanClose="False" CanAutoHide="False"
@@ -446,22 +457,22 @@
                 <ColumnDefinition Width="290"/>
             </Grid.ColumnDefinitions>
             <DockPanel>
-            <TextBlock Text="{Binding BitmapManager.SelectedTool.ActionDisplay}" Foreground="White" FontSize="15" Margin="10,0,0,0" VerticalAlignment="Center"/>
-            <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
-                <TextBlock Text="X:" Foreground="White" FontSize="16"/>
-                <TextBlock Margin="4,0,10,0" Text="{Binding BitmapManager.ActiveDocument.MouseXOnCanvas, Converter={StaticResource DoubleToIntConverter}}" Foreground="White" FontSize="16"/>
-                <TextBlock Text="Y:" Foreground="White" FontSize="16"/>
-                <TextBlock Margin="4,0,10,0" Text="{Binding BitmapManager.ActiveDocument.MouseYOnCanvas, Converter={StaticResource DoubleToIntConverter}}" Foreground="White" FontSize="16"/>
-            </StackPanel>
-        </DockPanel>
-        <StackPanel Margin="10,0,0,0" VerticalAlignment="Center" Grid.Row="3"
+                <TextBlock Text="{Binding BitmapManager.SelectedTool.ActionDisplay}" Foreground="White" FontSize="15" Margin="10,0,0,0" VerticalAlignment="Center"/>
+                <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
+                    <TextBlock Text="X:" Foreground="White" FontSize="16"/>
+                    <TextBlock Margin="4,0,10,0" Text="{Binding BitmapManager.ActiveDocument.MouseXOnCanvas, Converter={StaticResource DoubleToIntConverter}}" Foreground="White" FontSize="16"/>
+                    <TextBlock Text="Y:" Foreground="White" FontSize="16"/>
+                    <TextBlock Margin="4,0,10,0" Text="{Binding BitmapManager.ActiveDocument.MouseYOnCanvas, Converter={StaticResource DoubleToIntConverter}}" Foreground="White" FontSize="16"/>
+                </StackPanel>
+            </DockPanel>
+            <StackPanel Margin="10,0,0,0" VerticalAlignment="Center" Grid.Row="3"
                        Grid.Column="3" Orientation="Horizontal">
-            <Button Style="{StaticResource BaseDarkButton}" 
+                <Button Style="{StaticResource BaseDarkButton}" 
                     Visibility="{Binding UpdateSubViewModel.UpdateReadyToInstall, Converter={StaticResource BoolToVisibilityConverter}, FallbackValue=Hidden}" FontSize="14" Height="20" 
                     Command="{Binding UpdateSubViewModel.RestartApplicationCommand}">Restart</Button>
-            <TextBlock VerticalAlignment="Center" Padding="10" HorizontalAlignment="Right"
+                <TextBlock VerticalAlignment="Center" Padding="10" HorizontalAlignment="Right"
                        Foreground="White" FontSize="14"  Text="{Binding UpdateSubViewModel.VersionText}" />
-        </StackPanel>
+            </StackPanel>
         </Grid>
     </Grid>
-</Window>
+</Window>

+ 5 - 11
PixiEditor/Views/MainWindow.xaml.cs

@@ -1,16 +1,10 @@
-using System;
+using Microsoft.Extensions.DependencyInjection;
+using PixiEditor.Models.UserPreferences;
+using PixiEditor.ViewModels;
+using System;
 using System.ComponentModel;
-using System.Diagnostics;
-using System.IO;
 using System.Windows;
 using System.Windows.Input;
-using Microsoft.Extensions.DependencyInjection;
-using PixiEditor.Helpers;
-using PixiEditor.Models.Dialogs;
-using PixiEditor.Models.Processes;
-using PixiEditor.Models.UserPreferences;
-using PixiEditor.UpdateModule;
-using PixiEditor.ViewModels;
 
 namespace PixiEditor
 {
@@ -87,4 +81,4 @@ namespace PixiEditor
             AppDomain.CurrentDomain.UnhandledException += (sender, e) => Helpers.CrashHelper.SaveCrashInfo((Exception)e.ExceptionObject);
         }
     }
-}
+}

+ 6 - 7
PixiEditor/Views/UserControls/AnchorPointPicker.xaml.cs

@@ -1,7 +1,7 @@
-using System.Windows;
+using PixiEditor.Models.Enums;
+using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Controls.Primitives;
-using PixiEditor.Models.Enums;
 
 namespace PixiEditor.Views
 {
@@ -10,7 +10,6 @@ namespace PixiEditor.Views
     /// </summary>
     public partial class AnchorPointPicker : UserControl
     {
-        // Using a DependencyProperty as the backing store for AnchorPoint.  This enables animation, styling, binding, etc...
         public static readonly DependencyProperty AnchorPointProperty =
             DependencyProperty.Register("AnchorPoint", typeof(AnchorPoint), typeof(AnchorPointPicker),
                 new PropertyMetadata());
@@ -25,14 +24,14 @@ namespace PixiEditor.Views
 
         public AnchorPoint AnchorPoint
         {
-            get => (AnchorPoint) GetValue(AnchorPointProperty);
+            get => (AnchorPoint)GetValue(AnchorPointProperty);
             set => SetValue(AnchorPointProperty, value);
         }
 
         private void ToggleButton_Checked(object sender, RoutedEventArgs e)
         {
-            ToggleButton btn = (ToggleButton) sender;
-            AnchorPoint = (AnchorPoint) (1 << (Grid.GetRow(btn) + 3)) | (AnchorPoint) (1 << Grid.GetColumn(btn));
+            ToggleButton btn = (ToggleButton)sender;
+            AnchorPoint = (AnchorPoint)(1 << (Grid.GetRow(btn) + 3)) | (AnchorPoint)(1 << Grid.GetColumn(btn));
             if (_selectedToggleButton != null) _selectedToggleButton.IsChecked = false;
             _selectedToggleButton = btn;
         }
@@ -43,4 +42,4 @@ namespace PixiEditor.Views
                 e.Handled = true;
         }
     }
-}
+}

+ 2 - 2
PixiEditor/Views/UserControls/MainDrawingPanel.xaml

@@ -7,7 +7,7 @@
              xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
              xmlns:helpers="clr-namespace:PixiEditor.Helpers"
              xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
-             mc:Ignorable="d" PreviewMouseDown="mainDrawingPanel_MouseDown" PreviewMouseUp="mainDrawingPanel_PreviewMouseUp"
+             mc:Ignorable="d" PreviewMouseDown="MainDrawingPanel_PreviewMouseDown" PreviewMouseUp="MainDrawingPanel_PreviewMouseUp"
              d:DesignHeight="450" d:DesignWidth="800" x:Name="mainDrawingPanel" PreviewMouseWheel="Zoombox_MouseWheel">
     <xctk:Zoombox PreviewMouseDown="Zoombox_PreviewMouseDown" Cursor="{Binding Cursor}" Name="Zoombox" KeepContentInBounds="False"
                   Loaded="Zoombox_Loaded" IsAnimated="False" MouseDown="Zoombox_MouseDown"
@@ -19,4 +19,4 @@
         </i:Interaction.Triggers>
         <ContentPresenter Content="{Binding Item, ElementName=mainDrawingPanel}" />
     </xctk:Zoombox>
-</UserControl>
+</UserControl>

+ 13 - 15
PixiEditor/Views/UserControls/MainDrawingPanel.xaml.cs

@@ -1,13 +1,11 @@
-using PixiEditor.ViewModels;
+using PixiEditor.Models.Tools.Tools;
+using PixiEditor.ViewModels;
 using System;
 using System.Windows;
-using System.Windows.Automation;
 using System.Windows.Controls;
 using System.Windows.Input;
-using PixiEditor.Models.Tools.Tools;
 using Xceed.Wpf.Toolkit.Core.Input;
 using Xceed.Wpf.Toolkit.Zoombox;
-using PixiEditor.Models.Position;
 
 namespace PixiEditor.Views
 {
@@ -114,7 +112,7 @@ namespace PixiEditor.Views
 
         public bool IsUsingZoomTool
         {
-            get => (bool) GetValue(IsUsingZoomToolProperty);
+            get => (bool)GetValue(IsUsingZoomToolProperty);
             set => SetValue(IsUsingZoomToolProperty, value);
         }
 
@@ -147,7 +145,7 @@ namespace PixiEditor.Views
         {
             MainDrawingPanel panel = (MainDrawingPanel)d;
             double percentage = (double)e.NewValue;
-            if(percentage == 100)
+            if (percentage == 100)
             {
                 panel.SetClickValues();
             }
@@ -182,6 +180,12 @@ namespace PixiEditor.Views
             panel.Zoombox.Position = newPos;
         }
 
+        private static void OnCenterChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+        {
+            MainDrawingPanel panel = (MainDrawingPanel)d;
+            panel.Zoombox.FitToBounds();
+        }
+
         private void Zoombox_CurrentViewChanged(object sender, ZoomboxViewChangedEventArgs e)
         {
             Zoombox.MinScale = 32 / ((FrameworkElement)Item).Width;
@@ -214,12 +218,6 @@ namespace PixiEditor.Views
             Zoombox.ZoomOrigin = new Point(Math.Clamp(mousePos.X / item.Width, 0, 1), Math.Clamp(mousePos.Y / item.Height, 0, 1));
         }
 
-        private static void OnCenterChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
-        {
-            MainDrawingPanel panel = (MainDrawingPanel) d;
-            panel.Zoombox.FitToBounds();
-        }
-
         private void Zoombox_Loaded(object sender, RoutedEventArgs e)
         {
             if (CenterOnStart)
@@ -235,7 +233,7 @@ namespace PixiEditor.Views
             SetZoomOrigin();
         }
 
-        private void mainDrawingPanel_MouseDown(object sender, MouseButtonEventArgs e)
+        private void MainDrawingPanel_PreviewMouseDown(object sender, MouseButtonEventArgs e)
         {
             IsUsingZoomTool = ViewModelMain.Current.BitmapManager.SelectedTool is ZoomTool;
             Mouse.Capture((IInputElement)sender, CaptureMode.SubTree);
@@ -243,7 +241,7 @@ namespace PixiEditor.Views
             SetClickValues();
         }
 
-        private void mainDrawingPanel_PreviewMouseUp(object sender, MouseButtonEventArgs e)
+        private void MainDrawingPanel_PreviewMouseUp(object sender, MouseButtonEventArgs e)
         {
             ((IInputElement)sender).ReleaseMouseCapture();
         }
@@ -257,4 +255,4 @@ namespace PixiEditor.Views
             }
         }
     }
-}
+}

+ 4 - 4
PixiEditor/Views/UserControls/MenuButton.xaml.cs

@@ -1,6 +1,6 @@
-using System.Windows;
+using PixiEditor.ViewModels;
+using System.Windows;
 using System.Windows.Controls;
-using PixiEditor.ViewModels;
 
 namespace PixiEditor.Views
 {
@@ -27,7 +27,7 @@ namespace PixiEditor.Views
 
         public string Text
         {
-            get => (string) GetValue(MenuButtonTextProperty);
+            get => (string)GetValue(MenuButtonTextProperty);
             set => SetValue(MenuButtonTextProperty, value);
         }
 
@@ -43,4 +43,4 @@ namespace PixiEditor.Views
             dc.CloseListViewCommand.Execute(null);
         }
     }
-}
+}

+ 1 - 9
PixiEditor/Views/UserControls/Rotatebox.xaml.cs

@@ -1,15 +1,7 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Windows;
 using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
 using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
 
 namespace PixiEditor.Views
 {
@@ -60,7 +52,7 @@ namespace PixiEditor.Views
                 Point currentLocation = Mouse.GetPosition(this);
 
                 // We want to rotate around the center of the knob, not the top corner
-                Point knobCenter = new Point(_width / 2, _height/ 2);
+                Point knobCenter = new Point(_width / 2, _height / 2);
 
                 // Calculate an angle
                 double radians = Math.Atan((currentLocation.Y - knobCenter.Y) /

+ 75 - 0
PixiEditor/Views/UserControls/SmallColorPicker.xaml

@@ -0,0 +1,75 @@
+<colorpicker:DualPickerControlBase x:Class="PixiEditor.Views.UserControls.SmallColorPicker"
+                                   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                                   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                                   xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+                                   xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+                                   xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+                                   xmlns:behaviors="clr-namespace:PixiEditor.Helpers.Behaviours"
+                                   xmlns:vws="clr-namespace:PixiEditor.Views"
+                                   xmlns:local="clr-namespace:PixiEditor.Views.UserControls"
+                                   xmlns:conv="clr-namespace:PixiEditor.Helpers.Converters"
+                                   mc:Ignorable="d" 
+                                   xmlns:colorpicker="clr-namespace:ColorPicker;assembly=ColorPicker"
+                                   d:DesignHeight="380"
+                                   d:DesignWidth="270"
+                                   MaxWidth="400"
+                                   x:Name="uc">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="pack://application:,,,/ColorPicker;component/Styles/DefaultColorPickerStyle.xaml" />
+            </ResourceDictionary.MergedDictionaries>
+            <conv:IntToPickerTypeConverter x:Key="IntToPickerTypeConverter"/>
+            <conv:FloorConverter x:Key="FloorConverter"/>
+            <conv:ThresholdVisibilityConverter x:Key="ShowWhenBig" CheckIfLess="False" Threshold="380"/>
+            <conv:ThresholdVisibilityConverter x:Key="ShowWhenSmall" CheckIfLess="True" Threshold="380"/>
+        </ResourceDictionary>
+    </UserControl.Resources>
+    <Grid>
+        <colorpicker:StandardColorPicker ColorState="{Binding ElementName=uc, Path=ColorState, Mode=TwoWay, Delay=10}"
+                                         SecondColorState="{Binding ElementName=uc, Path=SecondColorState, Mode=TwoWay, Delay=10}"
+                                         Visibility="{Binding ElementName=uc, Path=ActualHeight, Converter={StaticResource ShowWhenBig}}"
+                                         Style="{StaticResource DefaultColorPickerStyle}" x:Name="mainColorPicker" />
+        <Grid Visibility="{Binding ElementName=uc, Path=ActualHeight, Converter={StaticResource ShowWhenSmall}}">
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition MaxWidth="80" Width="1*"/>
+                <ColumnDefinition Width="3*"/>
+            </Grid.ColumnDefinitions>
+            <Grid.RowDefinitions>
+                <RowDefinition Height="8*"/>
+                <RowDefinition Height="2*"/>
+                <RowDefinition Height="1.2*"/>
+                <RowDefinition Height="25"/>
+            </Grid.RowDefinitions>
+            <colorpicker:SquarePicker Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="3"
+                                ColorState="{Binding ColorState, Mode=TwoWay, ElementName=uc}"
+                                PickerType="{Binding ElementName=colorSpaceComboBox, Path=SelectedIndex, Converter={StaticResource IntToPickerTypeConverter}}"/>
+            <colorpicker:ColorDisplay Grid.Row="1" Grid.RowSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3,0,0,0"
+                                ColorState="{Binding ColorState, Mode=TwoWay, ElementName=uc}" 
+                                SecondColorState="{Binding SecondColorState, Mode=TwoWay, ElementName=uc}"/>
+            <ComboBox Grid.Row="1" Grid.RowSpan="2" Grid.Column="2" Width="50" Height="20" HorizontalAlignment="Right" 
+                VerticalAlignment="Bottom" x:Name="colorSpaceComboBox" Margin="0,0,80,0">
+                <ComboBoxItem IsSelected="True">HSV</ComboBoxItem>
+                <ComboBoxItem>HSL</ComboBoxItem>
+            </ComboBox>
+            <colorpicker:HexColorTextBox Grid.Row="1" Grid.RowSpan="2" Grid.Column="2" Margin="0,0,3,0"
+                                    HorizontalAlignment="Right" VerticalAlignment="Bottom" 
+                                    ColorState="{Binding ColorState, Mode=TwoWay, ElementName=uc}"/>
+            <Grid Grid.Row="3" Grid.ColumnSpan="2">
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="25"/>
+                    <ColumnDefinition/>
+                    <ColumnDefinition Width="50"/>
+                </Grid.ColumnDefinitions>
+                <Label VerticalAlignment="Center" Margin="3,0,0,0">A:</Label>
+                <colorpicker:AlphaSlider Margin="5,0" Grid.Column="1" VerticalAlignment="Center" ColorState="{Binding ColorState, Mode=TwoWay, ElementName=uc}"/>
+                <vws:NumberInput 
+                    Grid.Column="2" HorizontalAlignment="Right" Margin="5,0"
+                    Min="0" Max="255"
+                    Width="40" Height="20"
+                    VerticalAlignment="Center"
+                    Value="{Binding ElementName=uc, Path=Color.A, Mode=TwoWay, Delay=10, Converter={StaticResource FloorConverter}}" />
+            </Grid>
+        </Grid>
+    </Grid>
+</colorpicker:DualPickerControlBase>

+ 12 - 0
PixiEditor/Views/UserControls/SmallColorPicker.xaml.cs

@@ -0,0 +1,12 @@
+using ColorPicker;
+
+namespace PixiEditor.Views.UserControls
+{
+    public partial class SmallColorPicker : DualPickerControlBase
+    {
+        public SmallColorPicker()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 2 - 9
stylecop.json

@@ -1,22 +1,15 @@
-{
+{
   "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
   "settings": {
     "indentation": {
       "indentationSize": 4
     },
-    "orderingRules": {
-      "usingDirectivesPlacement": "outsideNamespace"
-    },
     "maintainabilityRules": {
       "topLevelTypes": [ "class", "interface", "enum", "struct" ]
     },
     "readabilityRules": {
       "allowBuiltInTypeAliases": false
     },
-    "layoutRules": {
-      "newlineAtEndOfFile": "omit",
-      "allowConsecutiveUsings": false
-    },
     "documentationRules": {
       "xmlHeader": false,
       "documentInterfaces": false,
@@ -24,4 +17,4 @@
       "documentInternalElements": false
     }
   }
-}
+}