Browse Source

Merge branch 'master' into undo-layers

Krzysztof Krysiński 4 years ago
parent
commit
3b4991c6ed
66 changed files with 5630 additions and 367 deletions
  1. 3 0
      .gitignore
  2. 1 1
      LICENSE
  3. 7 0
      PixiEditor/App.xaml
  4. 4 5
      PixiEditor/Helpers/Behaviours/ClearFocusOnClickBehavior.cs
  5. 38 0
      PixiEditor/Helpers/Behaviours/GlobalShortcutFocusBehavior.cs
  6. 62 62
      PixiEditor/Helpers/Behaviours/MouseBehavior.cs
  7. 1 0
      PixiEditor/Helpers/Behaviours/TextBoxFocusBehavior.cs
  8. 24 0
      PixiEditor/Helpers/Converters/BoolToBrushConverter.cs
  9. 1 1
      PixiEditor/Helpers/Converters/BoolToColorConverter.cs
  10. 53 0
      PixiEditor/Helpers/Converters/BrushTuple.cs
  11. 26 0
      PixiEditor/Helpers/Converters/EmptyStringToVisibiltyConverter.cs
  12. 59 0
      PixiEditor/Helpers/CrashHelper.cs
  13. 28 0
      PixiEditor/Helpers/UI/DocumentsTemplateSelector.cs
  14. 20 0
      PixiEditor/Helpers/UI/PanelsStyleSelector.cs
  15. BIN
      PixiEditor/Images/PixiBotLogo.png
  16. 3 2
      PixiEditor/Models/Controllers/BitmapManager.cs
  17. 32 6
      PixiEditor/Models/DataHolders/Document.cs
  18. 3 1
      PixiEditor/Models/IO/Importer.cs
  19. 60 26
      PixiEditor/Models/ImageManipulation/BitmapUtils.cs
  20. 20 6
      PixiEditor/Models/Tools/ToolSettings/Settings/ColorSetting.cs
  21. 11 22
      PixiEditor/Models/Tools/ToolSettings/Settings/SizeSetting.cs
  22. 21 0
      PixiEditor/Models/UserPreferences/PreferencesSettings.cs
  23. 13 3
      PixiEditor/PixiEditor.csproj
  24. 3 3
      PixiEditor/Properties/AssemblyInfo.cs
  25. 429 0
      PixiEditor/Styles/AvalonDock/DarkBrushes.xaml
  26. 8 0
      PixiEditor/Styles/AvalonDock/NamespaceDoc.cs
  27. 26 0
      PixiEditor/Styles/AvalonDock/PixiEditorDockTheme.cs
  28. 7 0
      PixiEditor/Styles/AvalonDock/PixiEditorDockTheme.xaml
  29. 2506 0
      PixiEditor/Styles/AvalonDock/Themes/Generic.xaml
  30. 13 0
      PixiEditor/Styles/AvalonDock/Themes/Icons/IconGeometry.xaml
  31. 132 0
      PixiEditor/Styles/AvalonDock/Themes/Menu/DarkBrushes.xaml
  32. 226 0
      PixiEditor/Styles/AvalonDock/Themes/Menu/MenuItem.xaml
  33. 130 0
      PixiEditor/Styles/AvalonDock/Themes/Menu/MenuKeys.cs
  34. 8 0
      PixiEditor/Styles/AvalonDock/Themes/Menu/NamespaceDoc.cs
  35. 8 0
      PixiEditor/Styles/AvalonDock/Themes/NamespaceDoc.cs
  36. 582 0
      PixiEditor/Styles/AvalonDock/Themes/OverlayButtons.xaml
  37. 180 0
      PixiEditor/Styles/AvalonDock/Themes/ResourceKeys.cs
  38. 1 1
      PixiEditor/Styles/ImageCheckBoxStyle.xaml
  39. 212 0
      PixiEditor/ViewModels/SubViewModels/Main/DiscordViewModel.cs
  40. 5 1
      PixiEditor/ViewModels/SubViewModels/Main/FileViewModel.cs
  41. 5 0
      PixiEditor/ViewModels/SubViewModels/Main/IoViewModel.cs
  42. 4 3
      PixiEditor/ViewModels/SubViewModels/SubViewModel.cs
  43. 29 0
      PixiEditor/ViewModels/SubViewModels/UserPreferences/SettingsGroup.cs
  44. 89 0
      PixiEditor/ViewModels/SubViewModels/UserPreferences/SettingsViewModel.cs
  45. 3 0
      PixiEditor/ViewModels/ViewModelMain.cs
  46. 21 4
      PixiEditor/Views/Dialogs/SettingsWindow.xaml
  47. 187 155
      PixiEditor/Views/MainWindow.xaml
  48. 8 0
      PixiEditor/Views/MainWindow.xaml.cs
  49. 68 0
      PixiEditor/Views/UserControls/DiscordRPPreview.xaml
  50. 67 0
      PixiEditor/Views/UserControls/DiscordRPPreview.xaml.cs
  51. 1 1
      PixiEditor/Views/UserControls/DrawingViewPort.xaml
  52. 10 5
      PixiEditor/Views/UserControls/EditableTextBlock.xaml
  53. 30 21
      PixiEditor/Views/UserControls/EditableTextBlock.xaml.cs
  54. 14 9
      PixiEditor/Views/UserControls/LayerItem.xaml
  55. 13 5
      PixiEditor/Views/UserControls/LayerItem.xaml.cs
  56. 9 9
      PixiEditor/Views/UserControls/NumberInput.xaml
  57. 16 7
      PixiEditor/Views/UserControls/NumberInput.xaml.cs
  58. 2 2
      PixiEditor/Views/UserControls/SizeInput.xaml
  59. 2 0
      PixiEditor/Views/UserControls/SizePicker.xaml
  60. 16 0
      PixiEditor/Views/UserControls/ToolSettingColorPicker.xaml
  61. 50 0
      PixiEditor/Views/UserControls/ToolSettingColorPicker.xaml.cs
  62. 4 4
      PixiEditorTests/PixiEditorTests.csproj
  63. 14 0
      README.md
  64. BIN
      Screenshot.png
  65. 1 1
      windows-x64-release.yml
  66. 1 1
      windows-x86-release.yml

+ 3 - 0
.gitignore

@@ -332,3 +332,6 @@ ASALocalRun/
 PixiEditor/Properties/
 
 .vscode/
+
+Builds/
+Installer/Assets

+ 1 - 1
LICENSE

@@ -1,6 +1,6 @@
 MIT License
 
-Copyright (c) 2018-2020 flabbet
+Copyright (c) PixiEditor Organization
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

+ 7 - 0
PixiEditor/App.xaml

@@ -16,6 +16,13 @@
                 <ResourceDictionary Source="Styles/ImageCheckBoxStyle.xaml" />
                 <ResourceDictionary Source="Styles/DarkCheckboxStyle.xaml" />
                 <ResourceDictionary Source="Styles/LabelStyles.xaml" />
+                <ResourceDictionary Source="Styles/AvalonDock/DarkBrushes.xaml" />
+                <ResourceDictionary Source="Styles/AvalonDock/Themes/Menu/DarkBrushes.xaml" />
+                <ResourceDictionary Source="Styles/AvalonDock/Themes/OverlayButtons.xaml" />
+                <ResourceDictionary Source="Styles/AvalonDock/Themes/Menu/MenuItem.xaml" />
+                <ResourceDictionary Source="Styles/AvalonDock/Themes/Icons/IconGeometry.xaml" />
+                <ResourceDictionary Source="Styles/AvalonDock/Themes/Generic.xaml" />
+                <ResourceDictionary Source="Styles/AvalonDock/PixiEditorDockTheme.xaml" />
             </ResourceDictionary.MergedDictionaries>
         </ResourceDictionary>
     </Application.Resources>

+ 4 - 5
PixiEditor/Helpers/Behaviours/ClearFocusOnClickBehavior.cs

@@ -1,5 +1,4 @@
 using System.Windows;
-using System.Windows.Input;
 using System.Windows.Interactivity;
 
 namespace PixiEditor.Helpers.Behaviours
@@ -12,14 +11,14 @@ namespace PixiEditor.Helpers.Behaviours
             base.OnAttached();
         }
 
-        private void AssociatedObject_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
+        protected override void OnDetaching()
         {
-            AssociatedObject.Focus();
+            AssociatedObject.MouseDown -= AssociatedObject_MouseDown;
         }
 
-        protected override void OnDetaching()
+        private void AssociatedObject_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
         {
-            AssociatedObject.MouseDown -= AssociatedObject_MouseDown;
+            AssociatedObject.Focus();
         }
     }
 }

+ 38 - 0
PixiEditor/Helpers/Behaviours/GlobalShortcutFocusBehavior.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Interactivity;
+using PixiEditor.Models.Controllers.Shortcuts;
+
+namespace PixiEditor.Helpers.Behaviours
+{
+    public class GlobalShortcutFocusBehavior : Behavior<FrameworkElement>
+    {
+        protected override void OnAttached()
+        {
+            base.OnAttached();
+            AssociatedObject.GotKeyboardFocus += AssociatedObject_GotKeyboardFocus;
+            AssociatedObject.LostKeyboardFocus += AssociatedObject_LostKeyboardFocus;
+        }
+
+        protected override void OnDetaching()
+        {
+            base.OnDetaching();
+            AssociatedObject.GotKeyboardFocus -= AssociatedObject_GotKeyboardFocus;
+            AssociatedObject.LostKeyboardFocus -= AssociatedObject_LostKeyboardFocus;
+        }
+
+        private void AssociatedObject_LostKeyboardFocus(object sender, System.Windows.Input.KeyboardFocusChangedEventArgs e)
+        {
+            ShortcutController.BlockShortcutExecution = false;
+        }
+
+        private void AssociatedObject_GotKeyboardFocus(object sender, System.Windows.Input.KeyboardFocusChangedEventArgs e)
+        {
+            ShortcutController.BlockShortcutExecution = true;
+        }
+    }
+}

+ 62 - 62
PixiEditor/Helpers/Behaviours/MouseBehaviour.cs → PixiEditor/Helpers/Behaviours/MouseBehavior.cs

@@ -1,63 +1,63 @@
-using System.Windows;
-using System.Windows.Input;
-using System.Windows.Interactivity;
-
-namespace PixiEditor.Helpers.Behaviours
-{
-    public class MouseBehaviour : Behavior<FrameworkElement>
-    {
-        public static readonly DependencyProperty MouseYProperty = DependencyProperty.Register(
-            "MouseY", typeof(double), typeof(MouseBehaviour), new PropertyMetadata(default(double)));
-
-        public static readonly DependencyProperty MouseXProperty = DependencyProperty.Register(
-            "MouseX", typeof(double), typeof(MouseBehaviour), new PropertyMetadata(default(double)));
-
-        // Using a DependencyProperty as the backing store for RelativeTo.  This enables animation, styling, binding, etc...
-        public static readonly DependencyProperty RelativeToProperty =
-            DependencyProperty.Register(
-                "RelativeTo",
-                typeof(FrameworkElement),
-                typeof(MouseBehaviour),
-                new PropertyMetadata(default(FrameworkElement)));
-
-        public double MouseY
-        {
-            get => (double)GetValue(MouseYProperty);
-            set => SetValue(MouseYProperty, value);
-        }
-
-        public double MouseX
-        {
-            get => (double)GetValue(MouseXProperty);
-            set => SetValue(MouseXProperty, value);
-        }
-
-        public FrameworkElement RelativeTo
-        {
-            get => (FrameworkElement)GetValue(RelativeToProperty);
-            set => SetValue(RelativeToProperty, value);
-        }
-
-        protected override void OnAttached()
-        {
-            AssociatedObject.MouseMove += AssociatedObjectOnMouseMove;
-        }
-
-        protected override void OnDetaching()
-        {
-            AssociatedObject.MouseMove -= AssociatedObjectOnMouseMove;
-        }
-
-        private void AssociatedObjectOnMouseMove(object sender, MouseEventArgs mouseEventArgs)
-        {
-            if (RelativeTo == null)
-            {
-                RelativeTo = AssociatedObject;
-            }
-
-            Point pos = mouseEventArgs.GetPosition(RelativeTo);
-            MouseX = pos.X;
-            MouseY = pos.Y;
-        }
-    }
+using System.Windows;
+using System.Windows.Input;
+using System.Windows.Interactivity;
+
+namespace PixiEditor.Helpers.Behaviours
+{
+    public class MouseBehavior : Behavior<FrameworkElement>
+    {
+        public static readonly DependencyProperty MouseYProperty = DependencyProperty.Register(
+            "MouseY", typeof(double), typeof(MouseBehavior), new PropertyMetadata(default(double)));
+
+        public static readonly DependencyProperty MouseXProperty = DependencyProperty.Register(
+            "MouseX", typeof(double), typeof(MouseBehavior), new PropertyMetadata(default(double)));
+
+        // Using a DependencyProperty as the backing store for RelativeTo.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty RelativeToProperty =
+            DependencyProperty.Register(
+                "RelativeTo",
+                typeof(FrameworkElement),
+                typeof(MouseBehavior),
+                new PropertyMetadata(default(FrameworkElement)));
+
+        public double MouseY
+        {
+            get => (double)GetValue(MouseYProperty);
+            set => SetValue(MouseYProperty, value);
+        }
+
+        public double MouseX
+        {
+            get => (double)GetValue(MouseXProperty);
+            set => SetValue(MouseXProperty, value);
+        }
+
+        public FrameworkElement RelativeTo
+        {
+            get => (FrameworkElement)GetValue(RelativeToProperty);
+            set => SetValue(RelativeToProperty, value);
+        }
+
+        protected override void OnAttached()
+        {
+            AssociatedObject.MouseMove += AssociatedObjectOnMouseMove;
+        }
+
+        protected override void OnDetaching()
+        {
+            AssociatedObject.MouseMove -= AssociatedObjectOnMouseMove;
+        }
+
+        private void AssociatedObjectOnMouseMove(object sender, MouseEventArgs mouseEventArgs)
+        {
+            if (RelativeTo == null)
+            {
+                RelativeTo = AssociatedObject;
+            }
+
+            Point pos = mouseEventArgs.GetPosition(RelativeTo);
+            MouseX = pos.X;
+            MouseY = pos.Y;
+        }
+    }
 }

+ 1 - 0
PixiEditor/Helpers/Behaviours/TextBoxFocusBehavior.cs

@@ -3,6 +3,7 @@ using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Input;
 using System.Windows.Interactivity;
+using PixiEditor.Models.Controllers.Shortcuts;
 
 namespace PixiEditor.Helpers.Behaviours
 {

+ 24 - 0
PixiEditor/Helpers/Converters/BoolToBrushConverter.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace PixiEditor.Helpers.Converters
+{
+    public class BoolToBrushConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            BrushTuple tuple = (BrushTuple)parameter;
+            return (bool)value ? tuple.FirstBrush : tuple.SecondBrush;
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

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

@@ -21,7 +21,7 @@ namespace PixiEditor.Helpers.Converters
                 }
             }
 
-            return "#638DCA";
+            return "#505056";
         }
     }
 }

+ 53 - 0
PixiEditor/Helpers/Converters/BrushTuple.cs

@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+
+namespace PixiEditor.Helpers.Converters
+{
+    public class BrushTuple : NotifyableObject, ITuple
+    {
+        public object this[int index]
+        {
+            get
+            {
+                return index switch
+                {
+                    0 => FirstBrush,
+                    1 => SecondBrush,
+                    _ => throw new IndexOutOfRangeException("Index was out of range")
+                };
+            }
+        }
+
+        private Brush item1;
+
+        public Brush FirstBrush
+        {
+            get => item1;
+            set
+            {
+                item1 = value;
+                RaisePropertyChanged(nameof(FirstBrush));
+            }
+        }
+
+        private Brush item2;
+
+        public Brush SecondBrush
+        {
+            get => item2;
+            set
+            {
+                item2 = value;
+                RaisePropertyChanged(nameof(SecondBrush));
+            }
+        }
+
+        public int Length => 2;
+    }
+}

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

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+
+namespace PixiEditor.Helpers.Converters
+{
+    class EmptyStringToVisibiltyConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            string s = (string)value;
+
+            return !string.IsNullOrEmpty(s) ? Visibility.Visible : Visibility.Collapsed;
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

+ 59 - 0
PixiEditor/Helpers/CrashHelper.cs

@@ -0,0 +1,59 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PixiEditor.Helpers
+{
+    public static class CrashHelper
+    {
+        public static void SaveCrashInfo(Exception e)
+        {
+            StringBuilder builder = new System.Text.StringBuilder();
+            DateTime currentTime = DateTime.Now;
+
+            builder
+                .Append($"PixiEditor crashed on {currentTime:yyyy.MM.dd} at {currentTime:HH:mm:ss}\n\n")
+                .Append("-------Crash message-------\n")
+                .Append(e.GetType().ToString())
+                .Append(": ")
+                .Append(e.Message);
+            {
+                var innerException = e.InnerException;
+                while (innerException != null)
+                {
+                    builder
+                        .Append("\n-----Inner exception-----\n")
+                        .Append(innerException.GetType().ToString())
+                        .Append(": ")
+                        .Append(innerException.Message);
+                    innerException = innerException.InnerException;
+                }
+            }
+
+            builder
+                .Append("\n\n-------Stack trace-------\n")
+                .Append(e.StackTrace);
+            {
+                var innerException = e.InnerException;
+                while (innerException != null)
+                {
+                    builder
+                        .Append("\n-----Inner exception-----\n")
+                        .Append(innerException.StackTrace);
+                    innerException = innerException.InnerException;
+                }
+            }
+
+            string filename = $"crash-{currentTime:yyyy-MM-dd_HH-mm-ss_fff}.txt";
+            string path = Path.Combine(
+                Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
+                "PixiEditor",
+                "crash_logs");
+            Directory.CreateDirectory(path);
+            File.WriteAllText(Path.Combine(path, filename), builder.ToString());
+        }
+    }
+}

+ 28 - 0
PixiEditor/Helpers/UI/DocumentsTemplateSelector.cs

@@ -0,0 +1,28 @@
+using System.Windows;
+using System.Windows.Controls;
+using AvalonDock.Layout;
+using PixiEditor.Models.DataHolders;
+using PixiEditor.ViewModels;
+
+namespace PixiEditor.Helpers.UI
+{
+    public class DocumentsTemplateSelector : DataTemplateSelector
+    {
+        public DocumentsTemplateSelector()
+        {
+
+        }
+
+        public DataTemplate DocumentsViewTemplate { get; set; }
+
+        public override DataTemplate SelectTemplate(object item, DependencyObject container)
+        {
+            if (item is Document)
+            {
+                return DocumentsViewTemplate;
+            }
+
+            return base.SelectTemplate(item, container);
+        }
+    }
+}

+ 20 - 0
PixiEditor/Helpers/UI/PanelsStyleSelector.cs

@@ -0,0 +1,20 @@
+using System.Windows;
+using System.Windows.Controls;
+using PixiEditor.Models.DataHolders;
+
+namespace PixiEditor.Helpers.UI
+{
+    public class PanelsStyleSelector : StyleSelector
+    {
+        public Style DocumentTabStyle { get; set; }
+
+        public override Style SelectStyle(object item, DependencyObject container)
+        {
+            if (item is Document)
+            {
+                return DocumentTabStyle;
+            }
+            return base.SelectStyle(item, container);
+        }
+    }
+}

BIN
PixiEditor/Images/PixiBotLogo.png


+ 3 - 2
PixiEditor/Models/Controllers/BitmapManager.cs

@@ -60,7 +60,7 @@ namespace PixiEditor.Models.Controllers
             : 1;
             set
             {
-                if (SelectedTool.Toolbar.GetSetting<SizeSetting>("ToolSize") is var toolSize)
+                if (SelectedTool.Toolbar.GetSetting<SizeSetting>("ToolSize") is SizeSetting toolSize)
                 {
                     toolSize.Value = value;
                     HighlightPixels(MousePositionConverter.CurrentCoordinates);
@@ -77,8 +77,9 @@ namespace PixiEditor.Models.Controllers
             get => activeDocument;
             set
             {
+                activeDocument?.UpdatePreviewImage();
                 activeDocument = value;
-                RaisePropertyChanged("ActiveDocument");
+                RaisePropertyChanged(nameof(ActiveDocument));
                 DocumentChanged?.Invoke(this, new DocumentChangedEventArgs(value));
             }
         }

+ 32 - 6
PixiEditor/Models/DataHolders/Document.cs

@@ -3,12 +3,15 @@ using System.Buffers;
 using System.Collections.ObjectModel;
 using System.IO;
 using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Media;
 using System.Windows.Media.Imaging;
 using PixiEditor.Helpers;
 using PixiEditor.Models.Controllers;
 using PixiEditor.Models.Enums;
+using PixiEditor.Models.ImageManipulation;
 using PixiEditor.Models.IO;
 using PixiEditor.Models.Layers;
 using PixiEditor.Models.Position;
@@ -23,6 +26,8 @@ namespace PixiEditor.Models.DataHolders
         private int height;
         private int width;
 
+        private DateTime openedUtc = DateTime.UtcNow;
+
         public Document(int width, int height)
         {
             Width = width;
@@ -55,6 +60,13 @@ namespace PixiEditor.Models.DataHolders
             }
         }
 
+        private WriteableBitmap previewImage;
+
+        public WriteableBitmap PreviewImage
+        {
+            get => previewImage;
+        }
+
         private string documentFilePath = string.Empty;
 
         public string DocumentFilePath
@@ -107,6 +119,11 @@ namespace PixiEditor.Models.DataHolders
             }
         }
 
+        public DateTime OpenedUTC
+        {
+            get => openedUtc;
+        }
+
         private Selection selection = new Selection(Array.Empty<Coordinates>());
 
         public Selection ActiveSelection
@@ -115,7 +132,7 @@ namespace PixiEditor.Models.DataHolders
             set
             {
                 selection = value;
-                RaisePropertyChanged("ActiveSelection");
+                RaisePropertyChanged(nameof(ActiveSelection));
             }
         }
 
@@ -127,7 +144,7 @@ namespace PixiEditor.Models.DataHolders
             set
             {
                 previewLayer = value;
-                RaisePropertyChanged("PreviewLayer");
+                RaisePropertyChanged(nameof(PreviewLayer));
             }
         }
 
@@ -203,11 +220,17 @@ namespace PixiEditor.Models.DataHolders
             set
             {
                 activeLayerIndex = value;
-                RaisePropertyChanged("ActiveLayerIndex");
-                RaisePropertyChanged("ActiveLayer");
+                RaisePropertyChanged(nameof(ActiveLayerIndex));
+                RaisePropertyChanged(nameof(ActiveLayer));
             }
         }
 
+        public void UpdatePreviewImage()
+        {
+            previewImage = BitmapUtils.GeneratePreviewBitmap(this, 30, 20);
+            RaisePropertyChanged(nameof(PreviewImage));
+        }
+
         public void GeneratePreviewLayer()
         {
             PreviewLayer = new Layer("_previewLayer")
@@ -517,7 +540,10 @@ namespace PixiEditor.Models.DataHolders
         {
             XamlAccesibleViewModel.BitmapManager.MouseController.StopRecordingMouseMovementChanges();
             XamlAccesibleViewModel.BitmapManager.MouseController.StartRecordingMouseMovementChanges(true);
-            XamlAccesibleViewModel.BitmapManager.ActiveDocument = this;
+            if (XamlAccesibleViewModel.BitmapManager.ActiveDocument != this)
+            {
+                XamlAccesibleViewModel.BitmapManager.ActiveDocument = this;
+            }
         }
 
         private void RequestCloseDocument(object parameter)
@@ -571,7 +597,7 @@ namespace PixiEditor.Models.DataHolders
                 int layerHeight = (int)(Layers[i].Height * heightRatio);
 
                 Layers[i].Resize(layerWidth, layerHeight, newWidth, newHeight);
-                Layers[i].Offset = new Thickness(Layers[i].OffsetX * widthRatio, Layers[i].OffsetY * heightRatio, 0, 0);
+                Layers[i].Offset = new Thickness(Math.Floor(Layers[i].OffsetX * widthRatio), Math.Floor(Layers[i].OffsetY * heightRatio), 0, 0);
             }
 
             Height = newHeight;

+ 3 - 1
PixiEditor/Models/IO/Importer.cs

@@ -77,7 +77,9 @@ namespace PixiEditor.Models.IO
             {
                 using FileStream stream = new FileStream(path, FileMode.Open, FileAccess.Read);
 
-                return PixiParser.DeserializeOld(stream).ToDocument();
+                Document doc = PixiParser.DeserializeOld(stream).ToDocument();
+                doc.DocumentFilePath = path;
+                return doc;
             }
             catch (SerializationException)
             {

+ 60 - 26
PixiEditor/Models/ImageManipulation/BitmapUtils.cs

@@ -1,6 +1,8 @@
-using System;
+using System;
 using System.Collections.Generic;
+using System.Linq;
 using System.Windows.Media.Imaging;
+using PixiEditor.Models.DataHolders;
 using PixiEditor.Models.Layers;
 using PixiEditor.Models.Position;
 using Color = System.Windows.Media.Color;
@@ -19,7 +21,11 @@ namespace PixiEditor.Models.ImageManipulation
         public static WriteableBitmap BytesToWriteableBitmap(int currentBitmapWidth, int currentBitmapHeight, byte[] byteArray)
         {
             WriteableBitmap bitmap = BitmapFactory.New(currentBitmapWidth, currentBitmapHeight);
-            bitmap.FromByteArray(byteArray);
+            if (byteArray != null)
+            {
+                bitmap.FromByteArray(byteArray);
+            }
+
             return bitmap;
         }
 
@@ -28,7 +34,7 @@ namespace PixiEditor.Models.ImageManipulation
         /// </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="height">Height of final bitmap.</param>        
         /// <returns>WriteableBitmap of layered bitmaps.</returns>
         public static WriteableBitmap CombineLayers(Layer[] layers, int width, int height)
         {
@@ -36,17 +42,19 @@ namespace PixiEditor.Models.ImageManipulation
 
             using (finalBitmap.GetBitmapContext())
             {
-                for (int i = 0; i < layers.Length; i++)
-                {
-                    float layerOpacity = layers[i].Opacity;
-                    for (int y = 0; y < finalBitmap.Height; y++)
-                    {
-                        for (int x = 0; x < finalBitmap.Width; x++)
+                for (int i = 0; i < layers.Length; i++)
+                {
+                    float layerOpacity = layers[i].Opacity;
+                    Layer layer = layers[i];
+
+                    for (int y = 0; y < layers[i].Height; y++)
+                    {
+                        for (int x = 0; x < layers[i].Width; x++)
                         {
-                            Color color = layers[i].GetPixelWithOffset(x, y);
+                            Color color = layer.GetPixel(x, y);
                             if (i > 0 && ((color.A < 255 && color.A > 0) || (layerOpacity < 1f && layerOpacity > 0 && color.A > 0)))
                             {
-                                var lastLayerPixel = finalBitmap.GetPixel(x, y);
+                                var lastLayerPixel = finalBitmap.GetPixel(x + layer.OffsetX, y + layer.OffsetY);
                                 byte pixelA = (byte)(color.A * layerOpacity);
                                 byte r = (byte)((color.R * pixelA / 255) + (lastLayerPixel.R * lastLayerPixel.A * (255 - pixelA) / (255 * 255)));
                                 byte g = (byte)((color.G * pixelA / 255) + (lastLayerPixel.G * lastLayerPixel.A * (255 - pixelA) / (255 * 255)));
@@ -58,20 +66,46 @@ namespace PixiEditor.Models.ImageManipulation
                             {
                                 color = Color.FromArgb(color.A, color.R, color.G, color.B);
                             }
-
-                            if (color.A > 0)
-                            {
-                                finalBitmap.SetPixel(x, y, color);
-                            }
-                        }
-                    }
-                }
+
+                            if (color.A > 0)
+                            {
+                                finalBitmap.SetPixel(x + layer.OffsetX, y + layer.OffsetY, color);
+                            }
+                        }
+                    }
+                }
             }
 
             return finalBitmap;
         }
+      
+      /// <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>
+        /// <param name="maxPreviewWidth">Max width of preview.</param>
+        /// <param name="maxPreviewHeight">Max height of preview.</param>
+        /// <returns>WriteableBitmap image.</returns>
+        public static WriteableBitmap GeneratePreviewBitmap(Document document, int maxPreviewWidth, int maxPreviewHeight)
+        {
+            WriteableBitmap previewBitmap = BitmapFactory.New(document.Width, document.Height);
+
+            // 0.8 because blit doesn't take into consideration layer opacity. Small images with opacity > 80% are simillar enough.
+            foreach (var layer in document.Layers.Where(x => x.IsVisible && x.Opacity > 0.8f))
+            {
+                previewBitmap.Blit(
+                    new Rect(layer.OffsetX, layer.OffsetY, layer.Width, layer.Height),
+                    layer.LayerBitmap,
+                    new Rect(0, 0, layer.Width, layer.Height));
+            }
+
+            int width = document.Width >= document.Height ? maxPreviewWidth : (int)Math.Ceiling(document.Width / ((float)document.Height / maxPreviewHeight));
+            int height = document.Height > document.Width ? maxPreviewHeight : (int)Math.Ceiling(document.Height / ((float)document.Width / maxPreviewWidth));
 
-        public static Dictionary<Guid, Color[]> GetPixelsForSelection(IEnumerable<Layer> layers, Coordinates[] selection)
+            return previewBitmap.Resize(width, height, WriteableBitmapExtensions.Interpolation.NearestNeighbor);
+        }
+
+        public static Dictionary<Layer, Color[]> GetPixelsForSelection(Layer[] layers, Coordinates[] selection)
         {
             Dictionary<Guid, Color[]> result = new Dictionary<Guid, Color[]>();
 
@@ -85,15 +119,15 @@ namespace PixiEditor.Models.ImageManipulation
                     {
                         Coordinates position = layer.GetRelativePosition(selection[j]);
                         if (position.X < 0 || position.X > layer.Width - 1 || position.Y < 0 ||
-                            position.Y > layer.Height - 1)
-                        {
-                            continue;
-                        }
-
+                            position.Y > layer.Height - 1)
+                        {
+                            continue;
+                        }
+
                         pixels[j] = layer.GetPixel(position.X, position.Y);
                     }
                 }
-
+
                 result[layer.LayerGuid] = pixels;
             }
 

+ 20 - 6
PixiEditor/Models/Tools/ToolSettings/Settings/ColorSetting.cs

@@ -1,7 +1,11 @@
-using System.Windows.Data;
+using System.Windows;
+using System.Windows.Data;
+using System.Windows.Interactivity;
 using System.Windows.Media;
 using ColorPicker;
-
+using PixiEditor.Helpers.Behaviours;
+using PixiEditor.Views;
+
 namespace PixiEditor.Models.Tools.ToolSettings.Settings
 {
     public class ColorSetting : Setting<Color>
@@ -11,17 +15,27 @@ namespace PixiEditor.Models.Tools.ToolSettings.Settings
         {
             Label = label;
             SettingControl = GenerateColorPicker();
-            Value = Color.FromArgb(0, 0, 0, 0);
+            Value = Color.FromArgb(255, 255, 255, 255);
         }
 
-        private PortableColorPicker GenerateColorPicker()
+        private ToolSettingColorPicker GenerateColorPicker()
         {
-            PortableColorPicker picker = new PortableColorPicker();
+            var resourceDictionary = new ResourceDictionary();
+            resourceDictionary.Source = new System.Uri(
+                "pack://application:,,,/ColorPicker;component/Styles/DefaultColorPickerStyle.xaml",
+                System.UriKind.RelativeOrAbsolute);
+            ToolSettingColorPicker picker = new ToolSettingColorPicker
+            {
+                Style = (Style)resourceDictionary["DefaultColorPickerStyle"]
+            };
+
             Binding binding = new Binding("Value")
             {
                 Mode = BindingMode.TwoWay
             };
-            picker.SetBinding(PortableColorPicker.SelectedColorProperty, binding);
+            GlobalShortcutFocusBehavior behavor = new GlobalShortcutFocusBehavior();
+            Interaction.GetBehaviors(picker).Add(behavor);
+            picker.SetBinding(ToolSettingColorPicker.SelectedColorProperty, binding);
             return picker;
         }
     }

+ 11 - 22
PixiEditor/Models/Tools/ToolSettings/Settings/SizeSetting.cs

@@ -4,7 +4,8 @@ using System.Windows.Data;
 using System.Windows.Interactivity;
 using PixiEditor.Helpers;
 using PixiEditor.Helpers.Behaviours;
-
+using PixiEditor.Views;
+
 namespace PixiEditor.Models.Tools.ToolSettings.Settings
 {
     public class SizeSetting : Setting<int>
@@ -17,32 +18,20 @@ namespace PixiEditor.Models.Tools.ToolSettings.Settings
             Label = label;
         }
 
-        private TextBox GenerateTextBox()
+        private SizeInput GenerateTextBox()
         {
-            TextBox tb = new TextBox
+            SizeInput tb = new SizeInput
             {
-                TextAlignment = TextAlignment.Center,
-                MaxLength = 4,
                 Width = 40,
-                Height = 20
-            };
-
-            if (Application.Current != null)
-            {
-                tb.Style = (Style)Application.Current.TryFindResource("DarkTextBoxStyle");
-            }
+                Height = 20,
+                FontSize = 12,
+            };
 
-            Binding binding = new Binding("Value")
-            {
-                Converter = new ToolSizeToIntConverter(),
-                Mode = BindingMode.TwoWay
-            };
-            tb.SetBinding(TextBox.TextProperty, binding);
-            TextBoxFocusBehavior behavor = new TextBoxFocusBehavior
-            {
-                FillSize = true
+            Binding binding = new Binding("Value")
+            {
+                Mode = BindingMode.TwoWay,
             };
-            Interaction.GetBehaviors(tb).Add(behavor);
+            tb.SetBinding(SizeInput.SizeProperty, binding);
             return tb;
         }
     }

+ 21 - 0
PixiEditor/Models/UserPreferences/PreferencesSettings.cs

@@ -55,6 +55,14 @@ namespace PixiEditor.Models.UserPreferences
 
             Preferences[name] = value;
 
+            if (Callbacks.ContainsKey(name))
+            {
+                foreach (var action in Callbacks[name])
+                {
+                    action.Invoke(value);
+                }
+            }
+
             Save();
         }
 
@@ -70,6 +78,19 @@ namespace PixiEditor.Models.UserPreferences
 
 #nullable enable
 
+        public static Dictionary<string, List<Action<object>>> Callbacks { get; set; } = new Dictionary<string, List<Action<object>>>();
+
+        public static void AddCallback(string setting, Action<object> action)
+        {
+            if (Callbacks.ContainsKey(setting))
+            {
+                Callbacks[setting].Add(action);
+                return;
+            }
+
+            Callbacks.Add(setting, new List<Action<object>>() { action });
+        }
+
         public static T? GetPreference<T>(string name)
         {
             return GetPreference(name, default(T));

+ 13 - 3
PixiEditor/PixiEditor.csproj

@@ -9,11 +9,11 @@
     <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
     <AssemblyName>PixiEditor</AssemblyName>
     <RootNamespace>PixiEditor</RootNamespace>
-    <RepositoryUrl>https://github.com/flabbet/PixiEditor</RepositoryUrl>
+    <RepositoryUrl>https://github.com/PixiEditor/PixiEditor</RepositoryUrl>
     <PackageLicenseFile>LICENSE</PackageLicenseFile>
     <PackageIcon>icon.ico</PackageIcon>
     <ApplicationIcon>..\icon.ico</ApplicationIcon>
-    <Authors>Krzysztof Krysiński</Authors>
+    <Authors>Krzysztof Krysiński, Egor Mozgovoy, CPK</Authors>
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
@@ -26,12 +26,20 @@
     <DebugSymbols>true</DebugSymbols>
   </PropertyGroup>
 
+  <ItemGroup>
+    <Compile Remove="Styles\AvalonDock\Images\**" />
+    <EmbeddedResource Remove="Styles\AvalonDock\Images\**" />
+    <None Remove="Styles\AvalonDock\Images\**" />
+    <Page Remove="Styles\AvalonDock\Images\**" />
+  </ItemGroup>
+
   <ItemGroup>
     <None Remove="Images\AnchorDot.png" />
     <None Remove="Images\Eye-off.png" />
     <None Remove="Images\Eye.png" />
     <None Remove="Images\MoveImage.png" />
     <None Remove="Images\MoveViewportImage.png" />
+    <None Remove="Images\PixiBotLogo.png" />
     <None Remove="Images\PixiEditorLogo.png" />
     <None Remove="Images\SelectImage.png" />
     <None Remove="Images\ZoomImage.png" />
@@ -45,7 +53,8 @@
     </None>
   </ItemGroup>
   <ItemGroup>
-    <PackageReference Include="Dirkster.AvalonDock.Themes.VS2013" Version="4.50.0" />
+    <PackageReference Include="Dirkster.AvalonDock" Version="4.50.1" />
+    <PackageReference Include="DiscordRichPresence" Version="1.0.175" />
     <PackageReference Include="Expression.Blend.Sdk">
       <Version>1.0.2</Version>
     </PackageReference>
@@ -71,6 +80,7 @@
     <Resource Include="Images\MoveViewportImage.png" />
     <Resource Include="Images\PenImage.png" />
     <Resource Include="Images\ColorPickerImage.png" />
+    <Resource Include="Images\PixiBotLogo.png" />
     <Resource Include="Images\PixiEditorLogo.png" />
     <Resource Include="Images\RectangleImage.png" />
     <Resource Include="Images\SelectImage.png" />

+ 3 - 3
PixiEditor/Properties/AssemblyInfo.cs

@@ -10,7 +10,7 @@ using System.Windows;
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("PixiEditor")]
 [assembly: AssemblyProduct("PixiEditor")]
-[assembly: AssemblyCopyright("Copyright Krzysztof Krysiński © 2018 - 2020")]
+[assembly: AssemblyCopyright("Copyright PixiEditor © 2018 - 2021")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
@@ -50,5 +50,5 @@ using System.Windows;
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.1.3.7")]
-[assembly: AssemblyFileVersion("0.1.3.7")]
+[assembly: AssemblyVersion("0.1.4.1")]
+[assembly: AssemblyFileVersion("0.1.4.1")]

+ 429 - 0
PixiEditor/Styles/AvalonDock/DarkBrushes.xaml

@@ -0,0 +1,429 @@
+<ResourceDictionary
+	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+	xmlns:options="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" 
+	xmlns:reskeys="clr-namespace:PixiEditor.Styles.AvalonDock.Themes">
+	<ResourceDictionary.MergedDictionaries>
+		<ResourceDictionary Source="Themes/Menu/DarkBrushes.xaml" />
+	</ResourceDictionary.MergedDictionaries>
+
+	<!--  Accent Keys  -->
+    <Color x:Key="{x:Static reskeys:ResourceKeys.ControlAccentColorKey}">#B00022</Color>
+
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ControlAccentBrushKey}"
+		options:Freeze="true"
+		Color="{DynamicResource {x:Static reskeys:ResourceKeys.ControlAccentColorKey}}" />
+
+	<!--  General  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.Background}"
+		options:Freeze="true"
+		Color="#252525" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.PanelBorderBrush}"
+		options:Freeze="true"
+		Color="#3F3F46" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.TabBackground}"
+		options:Freeze="true"
+		Color="#252525" />
+
+	<!--  Auto Hide : Tab  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.AutoHideTabDefaultBackground}"
+		options:Freeze="true"
+		Color="#2D2D30" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.AutoHideTabDefaultBorder}"
+		options:Freeze="true"
+		Color="#3F3F46" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.AutoHideTabDefaultText}"
+		options:Freeze="true"
+		Color="#D0D0D0" />
+
+	<!--  Mouse Over Auto Hide Button for (collapsed) Auto Hidden Elements  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.AutoHideTabHoveredBackground}"
+		options:Freeze="true"
+		Color="#2D2D30" />
+	<!--  AccentColor  -->
+	<SolidColorBrush x:Key="{x:Static reskeys:ResourceKeys.AutoHideTabHoveredBorder}" Color="{DynamicResource {x:Static reskeys:ResourceKeys.ControlAccentColorKey}}" />
+
+	<!--  AccentColor  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.AutoHideTabHoveredText}"
+		options:Freeze="true"
+		Color="{DynamicResource {x:Static reskeys:ResourceKeys.ControlAccentColorKey}}" />
+
+	<!--  Document Well : Overflow Button  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonDefaultGlyph}"
+		options:Freeze="true"
+		Color="#F1F1F1" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonHoveredBackground}"
+		options:Freeze="true"
+		Color="#3E3E40" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonHoveredBorder}"
+		options:Freeze="true"
+		Color="#3E3E40" />
+	<!--  AccentColor  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonHoveredGlyph}"
+		options:Freeze="true"
+		Color="#FFFFFF" />
+	<!--  AccentColor  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonPressedBackground}"
+		options:Freeze="true"
+		Color="#B00022" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonPressedBorder}"
+		options:Freeze="true"
+		Color="#B00022" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonPressedGlyph}"
+		options:Freeze="true"
+		Color="#FFFFFF" />
+
+	<!--  Document Well : Tab  -->
+	<!--  Selected Document Highlight Header Top color (AccentColor)  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabSelectedActiveBackground}"
+		options:Freeze="true"
+		Color="#B00022" />
+
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabSelectedActiveText}"
+		options:Freeze="true"
+		Color="#F1F1F1" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabSelectedInactiveBackground}"
+		options:Freeze="true"
+		Color="#505056" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabSelectedInactiveText}"
+		options:Freeze="true"
+		Color="#F1F1F1" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabUnselectedBackground}"
+		options:Freeze="true"
+		Color="#252525" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabUnselectedText}"
+		options:Freeze="true"
+		Color="#F1F1F1" />
+	<!--  AccentColor  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabUnselectedHoveredBackground}"
+		options:Freeze="true"
+		Color="#4B4B4B" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabUnselectedHoveredText}"
+		options:Freeze="true"
+		Color="#FFFFFF" />
+
+	<!--  Document Well : Tab : X Button Foreground color for selected document  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveGlyph}"
+		options:Freeze="true"
+		Color="#FFFFFF" />
+
+	<!--  AccentColor  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBackground}"
+		options:Freeze="true"
+		Color="#616161" />
+	<!--  AccentColor  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBorder}"
+		options:Freeze="true"
+		Color="#616161" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredGlyph}"
+		options:Freeze="true"
+		Color="#FFFFFF" />
+	<!--  AccentColor  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBackground}"
+		options:Freeze="true"
+		Color="Black" />
+	<!--  AccentColor  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBorder}"
+		options:Freeze="true"
+		Color="Black" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedGlyph}"
+		options:Freeze="true"
+		Color="#FFFFFF" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveGlyph}"
+		options:Freeze="true"
+		Color="#6D6D70" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBackground}"
+		options:Freeze="true"
+		Color="#555555" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBorder}"
+		options:Freeze="true"
+		Color="#555555" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredGlyph}"
+		options:Freeze="true"
+		Color="#F1F1F1" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBackground}"
+		options:Freeze="true"
+		Color="#1B1B1C" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBorder}"
+		options:Freeze="true"
+		Color="#1B1B1C" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedGlyph}"
+		options:Freeze="true"
+		Color="#F1F1F1" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonUnselectedTabHoveredGlyph}"
+		options:Freeze="true"
+		Color="#D0E6F5" />
+	<!--  AccentColor  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonUnselectedTabHoveredButtonHoveredBackground}"
+		options:Freeze="true"
+		Color="#555555" />
+	<!--  AccentColor  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonUnselectedTabHoveredButtonHoveredBorder}"
+		options:Freeze="true"
+		Color="#555555" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonUnselectedTabHoveredButtonHoveredGlyph}"
+		options:Freeze="true"
+		Color="#FFFFFF" />
+	<!--  AccentColor  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonUnselectedTabHoveredButtonPressedBackground}"
+		options:Freeze="true"
+		Color="Black" />
+	<!--  AccentColor  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonUnselectedTabHoveredButtonPressedBorder}"
+		options:Freeze="true"
+		Color="Black" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonUnselectedTabHoveredButtonPressedGlyph}"
+		options:Freeze="true"
+		Color="#FFFFFF" />
+
+	<!--  Tool Window : Caption  -->
+	<!--  Background of selected toolwindow (AccentColor)  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionActiveBackground}"
+		options:Freeze="true"
+		Color="#B00022" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionActiveGrip}"
+		options:Freeze="true"
+		Color="Transparent" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionActiveText}"
+		options:Freeze="true"
+		Color="#FFFFFF" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionInactiveBackground}"
+		options:Freeze="true"
+		Color="#252525" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionInactiveGrip}"
+		options:Freeze="true"
+		Color="Transparent" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionInactiveText}"
+		options:Freeze="true"
+		Color="#D0D0D0" />
+
+	<!--  Tool Window : Caption : Button  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActiveGlyph}"
+		options:Freeze="true"
+		Color="#FFFFFF" />
+	<!--  AccentColor  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActiveHoveredBackground}"
+		options:Freeze="true"
+		Color="#D60029" />
+	<!--  AccentColor  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActiveHoveredBorder}"
+		options:Freeze="true"
+		Color="#D60029" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActiveHoveredGlyph}"
+		options:Freeze="true"
+		Color="#FFFFFF" />
+	<!--  (AccentColor)  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActivePressedBackground}"
+		options:Freeze="true"
+		Color="#D60029" />
+	<!--  (AccentColor)  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActivePressedBorder}"
+		options:Freeze="true"
+		Color="#D60029" />
+
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActivePressedGlyph}"
+		options:Freeze="true"
+		Color="#FFFFFF" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveGlyph}"
+		options:Freeze="true"
+		Color="#F1F1F1" />
+
+	<!--  (AccentColor)  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveHoveredBackground}"
+		options:Freeze="true"
+		Color="#393939" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveHoveredBorder}"
+		options:Freeze="true"
+		Color="#393939" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveHoveredGlyph}"
+		options:Freeze="true"
+		Color="#F1F1F1" />
+
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactivePressedBackground}"
+		options:Freeze="true"
+		Color="#D60029" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactivePressedBorder}"
+		options:Freeze="true"
+		Color="#D60029" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactivePressedGlyph}"
+		options:Freeze="true"
+		Color="#FFFFFF" />
+
+	<!--  Tool Window : Tab  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowTabSelectedActiveBackground}"
+		options:Freeze="true"
+		Color="#252525" />
+	<!--  (AccentColor)  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowTabSelectedActiveText}"
+		options:Freeze="true"
+		Color="#FFFFFF" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowTabSelectedInactiveBackground}"
+		options:Freeze="true"
+		Color="#252525" />
+	<!--  (AccentColor)  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowTabSelectedInactiveText}"
+		options:Freeze="true"
+		Color="#FFFFFF" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowTabUnselectedBackground}"
+		options:Freeze="true"
+		Color="#2D2D30" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowTabUnselectedText}"
+		options:Freeze="true"
+		Color="#D0D0D0" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowTabUnselectedHoveredBackground}"
+		options:Freeze="true"
+		Color="#3E3E40" />
+	<!--  (AccentColor)  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowTabUnselectedHoveredText}"
+		options:Freeze="true"
+		Color="#EEEEEE" />
+
+	<!--  Floating Document Window  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.FloatingDocumentWindowBackground}"
+		options:Freeze="true"
+		Color="#2D2D30" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.FloatingDocumentWindowBorder}"
+		options:Freeze="true"
+		Color="#3F3F46" />
+
+	<!--  Floating Tool Window  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.FloatingToolWindowBackground}"
+		options:Freeze="true"
+		Color="#2D2D30" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.FloatingToolWindowBorder}"
+		options:Freeze="true"
+		Color="#3F3F46" />
+
+	<!--  Navigator Window  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.NavigatorWindowBackground}"
+		options:Freeze="true"
+		Color="#252525" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.NavigatorWindowForeground}"
+		options:Freeze="true"
+		Color="#FFD0D0D0" />
+
+	<!--  Background of selected text in NAvigator Window (AccentColor)  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.NavigatorWindowSelectedBackground}"
+		options:Freeze="true"
+		Color="#B00022" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.NavigatorWindowSelectedText}"
+		options:Freeze="true"
+		Color="#FFFFFF" />
+
+	<!--  DockingBrushKeys  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DockingButtonBackgroundBrushKey}"
+		options:Freeze="true"
+		Color="#20000000" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}"
+		options:Freeze="true"
+		Color="{DynamicResource {x:Static reskeys:ResourceKeys.ControlAccentColorKey}}" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DockingButtonForegroundArrowBrushKey}"
+		options:Freeze="true"
+		Color="White" />
+
+
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DockingButtonStarBorderBrushKey}"
+		options:Freeze="true"
+		Color="#40808080" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}"
+		options:Freeze="true"
+		Color="#4C000000" />
+
+	<!--  Preview Box is the highlighted rectangle that shows when a drop area in a window is indicated  -->
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.PreviewBoxBorderBrushKey}"
+		options:Freeze="true"
+		Color="{DynamicResource {x:Static reskeys:ResourceKeys.ControlAccentColorKey}}" />
+	<SolidColorBrush
+		x:Key="{x:Static reskeys:ResourceKeys.PreviewBoxBackgroundBrushKey}"
+		options:Freeze="true"
+		Opacity="0.5"
+		Color="{DynamicResource {x:Static reskeys:ResourceKeys.ControlAccentColorKey}}" />
+
+</ResourceDictionary>

+ 8 - 0
PixiEditor/Styles/AvalonDock/NamespaceDoc.cs

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

+ 26 - 0
PixiEditor/Styles/AvalonDock/PixiEditorDockTheme.cs

@@ -0,0 +1,26 @@
+/************************************************************************
+   AvalonDock
+
+   Copyright (C) 2007-2013 Xceed Software Inc.
+
+   This program is provided to you under the terms of the Microsoft Public
+   License (Ms-PL) as published at https://opensource.org/licenses/MS-PL
+ ************************************************************************/
+
+using System;
+using AvalonDock.Themes;
+
+namespace PixiEditor.Styles.AvalonDock
+{
+    /// <inheritdoc/>
+    public class PixiEditorDockTheme : Theme
+    {
+        /// <inheritdoc/>
+        public override Uri GetResourceUri()
+        {
+            return new Uri(
+                "/PixiEditor;component/Styles/AvalonDock/PixiEditorDockTheme.xaml",
+                UriKind.Relative);
+        }
+    }
+}

+ 7 - 0
PixiEditor/Styles/AvalonDock/PixiEditorDockTheme.xaml

@@ -0,0 +1,7 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
+    <ResourceDictionary.MergedDictionaries>
+        <ResourceDictionary Source="/PixiEditor;component/Styles/AvalonDock/DarkBrushes.xaml" />
+        <ResourceDictionary Source="/PixiEditor;component/Styles/AvalonDock/Themes/Generic.xaml" />
+    </ResourceDictionary.MergedDictionaries>
+
+</ResourceDictionary>

+ 2506 - 0
PixiEditor/Styles/AvalonDock/Themes/Generic.xaml

@@ -0,0 +1,2506 @@
+<ResourceDictionary
+	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+	xmlns:avalonDock="clr-namespace:AvalonDock;assembly=AvalonDock"
+	xmlns:avalonDockControls="clr-namespace:AvalonDock.Controls;assembly=AvalonDock"
+	xmlns:avalonDockConverters="clr-namespace:AvalonDock.Converters;assembly=AvalonDock"
+	xmlns:avalonDockProperties="clr-namespace:AvalonDock.Properties;assembly=AvalonDock"
+	xmlns:reskeys="clr-namespace:PixiEditor.Styles.AvalonDock.Themes"
+    xmlns:ex="clr-namespace:PixiEditor.Helpers.Extensions"
+	xmlns:shell="clr-namespace:Microsoft.Windows.Shell;assembly=AvalonDock">
+	<ResourceDictionary.MergedDictionaries>
+		<ResourceDictionary Source="/PixiEditor;component/Styles/AvalonDock/Themes/OverlayButtons.xaml" />
+        <ResourceDictionary Source="/PixiEditor;component/Styles/AvalonDock/Themes/Menu/MenuItem.xaml" />
+        <ResourceDictionary Source="/PixiEditor;component/Styles/AvalonDock/Themes/Icons/IconGeometry.xaml" />
+	</ResourceDictionary.MergedDictionaries>
+
+	<Style x:Key="DropDownControlArea" TargetType="avalonDockControls:DropDownControlArea" />
+
+	<!--
+	dirkster99: Removing this ToolTip style:
+	1) As it does not appear to add any additional value?
+	2) As it overwrites other Tooltip styles (eg using MLib in Edi or Aehnlich)
+	
+	<Style TargetType="ToolTip">
+        <Setter Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.Background}}" />
+        <Setter Property="Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.NavigatorWindowForeground}}" />
+        <Setter Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.PanelBorderBrush}}" />
+        <Setter Property="BorderThickness" Value="1" />
+        <Setter Property="MaxWidth" Value="246" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="ToolTip">
+                    <Border
+						Padding="5"
+						Background="{TemplateBinding Background}"
+						BorderBrush="{TemplateBinding BorderBrush}"
+						BorderThickness="{TemplateBinding BorderThickness}"
+						CornerRadius="2"
+						SnapsToDevicePixels="True"
+						Style="{DynamicResource DarkBorder}">
+                        <TextBlock
+							Margin="0"
+							HorizontalAlignment="Left"
+							VerticalAlignment="Center"
+							Background="Transparent"
+							FontFamily="{TemplateBinding FontFamily}"
+							FontSize="{TemplateBinding FontSize}"
+							Foreground="{TemplateBinding Foreground}"
+							Text="{TemplateBinding Content}"
+							TextWrapping="Wrap" />
+                    </Border>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>	-->
+
+	<!--
+		Re-styling this in AvalonDock since the menu on the drop-down button for more documents is otherwise black
+		BugFix for Issue http://avalondock.codeplex.com/workitem/15743
+	-->
+	<Style x:Key="PixiEditorDockThemeMenuItemStyle" BasedOn="{StaticResource {x:Type MenuItem}}" TargetType="{x:Type MenuItem}">
+		<Setter Property="HeaderTemplate" Value="{Binding Path=Root.Manager.DocumentPaneMenuItemHeaderTemplate}" />
+		<Setter Property="HeaderTemplateSelector" Value="{Binding Path=Root.Manager.DocumentPaneMenuItemHeaderTemplateSelector}" />
+		<Setter Property="BorderThickness" Value="0" />
+		<Setter Property="Template" Value="{StaticResource MLibMenuItem}" />
+	</Style>
+
+	<Style BasedOn="{StaticResource PixiEditorDockThemeMenuItemStyle}" TargetType="{x:Type avalonDockControls:MenuItemEx}">
+		<Setter Property="IconTemplate" Value="{Binding Path=Root.Manager.IconContentTemplate}" />
+		<Setter Property="IconTemplateSelector" Value="{Binding Path=Root.Manager.IconContentTemplateSelector}" />
+		<Setter Property="Command" Value="{Binding Path=., Converter={avalonDockConverters:ActivateCommandLayoutItemFromLayoutModelConverter}}" />
+		<!--
+			Retemplate ControlTemplate of MenuItem to get rid of blue'ish highlighting colors on menu item
+			https://stackoverflow.com/questions/34888636/change-background-color-of-menuitem-on-mouseover
+		-->
+	</Style>
+
+	<!--
+	dirkster99: Removing this ContextMenu style:
+	1) As it does not appear to add any additional value?
+	2) As it overwrites other ContextMenu styles (eg using MLib in Edi or Aehnlich)
+	<Style BasedOn="{StaticResource {x:Type ContextMenu}}" TargetType="{x:Type ContextMenu}">
+		<Setter Property="TextOptions.TextFormattingMode" Value="Display" />
+		<Setter Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.Background}}" />
+		<Setter Property="Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.NavigatorWindowForeground}}" />
+		<Setter Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.PanelBorderBrush}}" />
+		<Setter Property="BorderThickness" Value="1" />
+		<Setter Property="VerticalContentAlignment" Value="Center" />
+		<Setter Property="Padding" Value="0,6,0,6" />
+		<Setter Property="Grid.IsSharedSizeScope" Value="true" />
+		<Setter Property="ScrollViewer.PanningMode" Value="Both" />
+		<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
+		<Setter Property="Focusable" Value="False" />
+		<Setter Property="Template">
+			<Setter.Value>
+				<ControlTemplate TargetType="{x:Type ContextMenu}">
+					<Grid Margin="4">
+						<Border
+							x:Name="ContextMenuBorder"
+							Margin="0"
+							Background="{TemplateBinding Background}"
+							BorderBrush="{TemplateBinding BorderBrush}"
+							BorderThickness="1">
+							<ScrollViewer Name="ContextMenuScrollViewer" ScrollViewer.VerticalScrollBarVisibility="Auto">
+								<Grid RenderOptions.ClearTypeHint="Enabled">
+									<Canvas
+										Width="0"
+										Height="0"
+										HorizontalAlignment="Left"
+										VerticalAlignment="Top">
+										<Rectangle
+											Name="OpaqueRect"
+											Width="{Binding ElementName=ContextMenuBorder, Path=ActualWidth}"
+											Height="{Binding ElementName=ContextMenuBorder, Path=ActualHeight}"
+											Fill="{Binding ElementName=ContextMenuBorder, Path=Background}" />
+									</Canvas>
+									<ItemsPresenter
+										Name="ItemsPresenter"
+										KeyboardNavigation.DirectionalNavigation="Contained"
+										SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+								</Grid>
+							</ScrollViewer>
+						</Border>
+					</Grid>
+				</ControlTemplate>
+			</Setter.Value>
+		</Setter>
+	</Style>
+	-->
+
+	<Style BasedOn="{StaticResource {x:Type ContextMenu}}" TargetType="{x:Type avalonDockControls:ContextMenuEx}" />
+	<Style x:Key="PixiEditorDockThemeToolButtonStyle" TargetType="ToggleButton">
+		<Setter Property="Background" Value="Transparent" />
+		<Setter Property="BorderThickness" Value="1" />
+		<Setter Property="BorderBrush" Value="Transparent" />
+		<Setter Property="Padding" Value="0" />
+		<Setter Property="Template">
+			<Setter.Value>
+				<ControlTemplate TargetType="ToggleButton">
+					<Border
+						Background="{TemplateBinding Background}"
+						BorderBrush="{TemplateBinding BorderBrush}"
+						BorderThickness="{TemplateBinding BorderThickness}">
+						<ContentPresenter />
+					</Border>
+				</ControlTemplate>
+			</Setter.Value>
+		</Setter>
+
+		<Style.Triggers>
+			<Trigger Property="IsMouseOver" Value="True">
+				<!--<Setter Property="BorderBrush" Value="{DynamicResource AvalonDock_ThemeMetro_BaseColor31}" />
+                <Setter Property="Background" Value="{DynamicResource AvalonDock_ThemeMetro_BaseColor10}" />-->
+			</Trigger>
+			<Trigger Property="IsChecked" Value="True">
+				<!--<Setter Property="BorderBrush" Value="{DynamicResource AvalonDock_ThemeMetro_BaseColor31}" />
+                <Setter Property="Background" Value="{DynamicResource AvalonDock_ThemeMetro_BaseColor10}" />-->
+			</Trigger>
+		</Style.Triggers>
+	</Style>
+
+	<Style x:Key="PixiEditorDockThemeButtonStyle" TargetType="Button">
+		<Setter Property="Background" Value="Transparent" />
+		<Setter Property="BorderThickness" Value="1" />
+		<Setter Property="BorderBrush" Value="Transparent" />
+		<Setter Property="Padding" Value="0" />
+		<Setter Property="Template">
+			<Setter.Value>
+				<ControlTemplate TargetType="Button">
+					<Border
+						Background="{TemplateBinding Background}"
+						BorderBrush="{TemplateBinding BorderBrush}"
+						BorderThickness="{TemplateBinding BorderThickness}">
+						<ContentPresenter />
+					</Border>
+				</ControlTemplate>
+			</Setter.Value>
+		</Setter>
+	</Style>
+
+	<!--  DocumentPaneControlStyle  -->
+	<Style x:Key="PixiEditorDockThemeDocumentPaneControlStyle" TargetType="{x:Type avalonDockControls:LayoutDocumentPaneControl}">
+		<Setter Property="BorderBrush" Value="{x:Null}" />
+		<Setter Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.TabBackground}}" />
+		<Setter Property="Template">
+			<Setter.Value>
+				<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutDocumentPaneControl}">
+					<Grid
+						ClipToBounds="true"
+						KeyboardNavigation.TabNavigation="Local"
+						SnapsToDevicePixels="true">
+						<Grid.RowDefinitions>
+							<RowDefinition Height="Auto" />
+							<RowDefinition Height="*" />
+						</Grid.RowDefinitions>
+						<!--  Following border is required to catch mouse events  -->
+						<Border Grid.RowSpan="2" Background="Transparent" />
+						<Grid
+							Grid.Row="0"
+							Panel.ZIndex="1"
+							Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type avalonDockControls:LayoutDocumentPaneControl}}, Path=Model.ShowHeader, Converter={avalonDockConverters:BoolToVisibilityConverter}}">
+							<Grid.ColumnDefinitions>
+								<ColumnDefinition />
+								<ColumnDefinition Width="Auto" />
+							</Grid.ColumnDefinitions>
+							<Border
+								x:Name="BD"
+								Grid.ColumnSpan="2"
+								BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabSelectedActiveBackground}}"
+								BorderThickness="0,0,0,2" />
+							<avalonDockControls:DocumentPaneTabPanel
+								x:Name="HeaderPanel"
+								Grid.Row="0"
+								Grid.Column="0"
+								Margin="0"
+								IsItemsHost="true"
+								KeyboardNavigation.TabIndex="1" />
+							<avalonDockControls:DropDownButton
+								x:Name="MenuDropDownButton"
+								Grid.Column="1"
+								VerticalAlignment="Center"
+								Focusable="False"
+								Style="{StaticResource PixiEditorDockThemeToolButtonStyle}">
+								<avalonDockControls:DropDownButton.DropDownContextMenu>
+									<avalonDockControls:ContextMenuEx ItemsSource="{Binding Model.ChildrenSorted, RelativeSource={RelativeSource TemplatedParent}}" />
+								</avalonDockControls:DropDownButton.DropDownContextMenu>
+								<Path
+									x:Name="MenuDropDownButtonImage"
+									Width="10"
+									Height="10"
+									HorizontalAlignment="Center"
+									VerticalAlignment="Center"
+									Data="{DynamicResource PinDocMenu}"
+									Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonDefaultGlyph}}"
+									Stretch="Uniform" />
+							</avalonDockControls:DropDownButton>
+						</Grid>
+						<Border
+							x:Name="ContentPanel"
+							Grid.Row="1"
+							Grid.Column="0"
+							HorizontalAlignment="Stretch"
+							VerticalAlignment="Stretch"
+							Background="{TemplateBinding Background}"
+							BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.PanelBorderBrush}}"
+							BorderThickness="1,0,1,1"
+                            CornerRadius="0 0 5 5"
+							KeyboardNavigation.DirectionalNavigation="Contained"
+							KeyboardNavigation.TabIndex="2"
+							KeyboardNavigation.TabNavigation="Cycle">
+							<ContentPresenter
+								x:Name="PART_SelectedContentHost"
+								Margin="0"
+								ContentSource="SelectedContent"
+								SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+						</Border>
+					</Grid>
+					<ControlTemplate.Triggers>
+						<Trigger SourceName="MenuDropDownButton" Property="IsMouseOver" Value="True">
+							<Setter TargetName="MenuDropDownButton" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonHoveredBackground}}" />
+							<Setter TargetName="MenuDropDownButton" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonHoveredBorder}}" />
+							<Setter TargetName="MenuDropDownButtonImage" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonHoveredGlyph}}" />
+						</Trigger>
+
+						<Trigger SourceName="MenuDropDownButton" Property="IsChecked" Value="True">
+							<Setter TargetName="MenuDropDownButton" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonPressedBackground}}" />
+							<Setter TargetName="MenuDropDownButton" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonPressedBorder}}" />
+							<Setter TargetName="MenuDropDownButtonImage" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonPressedGlyph}}" />
+						</Trigger>
+
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding SelectedItem.IsActive, RelativeSource={RelativeSource Self}}" Value="False" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="BD" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabSelectedInactiveBackground}}" />
+						</MultiDataTrigger>
+
+						<Trigger Property="IsEnabled" Value="false">
+							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
+						</Trigger>
+
+						<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Model.ChildrenCount}" Value="0">
+							<Setter TargetName="BD" Property="BorderBrush" Value="Transparent" />
+							<Setter TargetName="ContentPanel" Property="Visibility" Value="Collapsed" />
+							<Setter TargetName="MenuDropDownButton" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="ContentPanel" Property="CornerRadius" Value="5"/>
+                        </DataTrigger>
+					</ControlTemplate.Triggers>
+				</ControlTemplate>
+			</Setter.Value>
+		</Setter>
+		<Setter Property="ItemContainerStyle">
+			<Setter.Value>
+				<Style TargetType="{x:Type TabItem}">
+					<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
+					<Setter Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabUnselectedBackground}}" />
+					<Setter Property="Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabUnselectedText}}" />
+					<Setter Property="BorderBrush" Value="Transparent" />
+					<Setter Property="ToolTip" Value="{Binding ToolTip}" />
+					<Setter Property="Padding" Value="6,1" />
+                    <Setter Property="Margin" Value="0" />
+                    <Setter Property="Template">
+						<Setter.Value>
+							<ControlTemplate TargetType="{x:Type TabItem}">
+                                <Grid SnapsToDevicePixels="true">
+                                    <Border
+										x:Name="Bd"
+										Background="{TemplateBinding Background}"
+										BorderBrush="{Binding Background, RelativeSource={RelativeSource Self}}"
+                                        CornerRadius="2.5 2.5 0 0"
+										BorderThickness="0,0,0,2" />
+                                    <ContentPresenter
+										x:Name="Content"
+										HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
+										VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
+										ContentSource="Header"
+										RecognizesAccessKey="True"
+										SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+                                </Grid>
+								<ControlTemplate.Triggers>
+                                    <Trigger Property="Selector.IsSelected" Value="true">
+                                        <Setter Property="Panel.ZIndex" Value="1" />
+                                    </Trigger>
+
+                                    <!--  Document Well : Tab / Selected, active  -->
+									<DataTrigger Binding="{Binding IsActive}" Value="True">
+										<Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabSelectedActiveBackground}}" />
+										<Setter Property="Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabSelectedActiveText}}" />
+										<Setter Property="Panel.ZIndex" Value="1" />
+									</DataTrigger>
+
+									<!--  Document Well : Tab / Selected, inactive  -->
+									<MultiDataTrigger>
+										<MultiDataTrigger.Conditions>
+											<Condition Binding="{Binding IsActive}" Value="False" />
+											<Condition Binding="{Binding IsSelected}" Value="True" />
+										</MultiDataTrigger.Conditions>
+										<Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabSelectedInactiveBackground}}" />
+										<Setter Property="Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabSelectedInactiveText}}" />
+									</MultiDataTrigger>
+
+									<!--  Document Well : Tab / Unselected  -->
+									<MultiDataTrigger>
+										<MultiDataTrigger.Conditions>
+											<Condition Binding="{Binding IsActive}" Value="False" />
+											<Condition Binding="{Binding IsSelected}" Value="False" />
+										</MultiDataTrigger.Conditions>
+										<Setter TargetName="Bd" Property="BorderBrush" Value="Transparent" />
+									</MultiDataTrigger>
+
+									<!--  Document Well : Tab / Unselected, hovered  -->
+									<MultiTrigger>
+										<MultiTrigger.Conditions>
+											<Condition Property="IsMouseOver" Value="true" />
+											<Condition Property="Selector.IsSelected" Value="false" />
+										</MultiTrigger.Conditions>
+										<Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabUnselectedHoveredBackground}}" />
+										<Setter Property="Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabUnselectedHoveredText}}" />
+										<Setter Property="Panel.ZIndex" Value="0" />
+									</MultiTrigger>
+
+									<Trigger Property="IsEnabled" Value="false">
+										<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
+									</Trigger>
+								</ControlTemplate.Triggers>
+							</ControlTemplate>
+						</Setter.Value>
+					</Setter>
+				</Style>
+			</Setter.Value>
+		</Setter>
+		<Setter Property="ItemTemplate">
+			<Setter.Value>
+				<DataTemplate>
+					<avalonDockControls:LayoutDocumentTabItem Model="{Binding}" />
+				</DataTemplate>
+			</Setter.Value>
+		</Setter>
+
+		<Setter Property="ContentTemplate">
+			<Setter.Value>
+				<DataTemplate>
+					<avalonDockControls:LayoutDocumentControl Model="{Binding}" />
+				</DataTemplate>
+			</Setter.Value>
+		</Setter>
+	</Style>
+
+	<!--  AnchorablePaneControlStyle  -->
+	<Style x:Key="PixiEditorDockThemeAnchorablePaneControlStyle" TargetType="{x:Type avalonDockControls:LayoutAnchorablePaneControl}">
+		<Setter Property="TabStripPlacement" Value="Bottom" />
+		<Setter Property="Padding" Value="0" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="Foreground" Value="{Binding Model.Root.Manager.Foreground, RelativeSource={RelativeSource Self}}" />
+		<Setter Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.TabBackground}}" />
+		<Setter Property="Template">
+			<Setter.Value>
+				<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutAnchorablePaneControl}">
+					<Grid
+						ClipToBounds="true"
+						KeyboardNavigation.TabNavigation="Local"                        
+						SnapsToDevicePixels="true">
+						<Grid.RowDefinitions>
+							<RowDefinition Height="*" />
+							<RowDefinition Height="Auto" />
+						</Grid.RowDefinitions>
+						<!--  Following border is required to catch mouse events  -->
+						<Border Grid.RowSpan="2" Background="Transparent" />
+						<Border
+							x:Name="ContentPanel"
+							Grid.Row="0"
+							Grid.Column="0"
+							Margin="0"
+                            CornerRadius="5 5 5 0"
+							Background="{TemplateBinding Background}"
+							BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.PanelBorderBrush}}"
+							BorderThickness="1"
+                            KeyboardNavigation.DirectionalNavigation="Contained"
+							KeyboardNavigation.TabIndex="2"
+							KeyboardNavigation.TabNavigation="Cycle">
+							<ContentPresenter
+								x:Name="PART_SelectedContentHost"
+								Margin="{TemplateBinding Padding}"
+								ContentSource="SelectedContent"
+								SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+						</Border>
+						<avalonDockControls:AnchorablePaneTabPanel
+							x:Name="HeaderPanel"
+							Grid.Row="1"
+							Margin="0"
+							Panel.ZIndex="1"
+							IsItemsHost="true"
+							KeyboardNavigation.TabIndex="1" />
+					</Grid>
+					<ControlTemplate.Triggers>
+                        <Trigger Property="IsEnabled" Value="false">
+                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+				</ControlTemplate>
+			</Setter.Value>
+		</Setter>
+
+		<Setter Property="ItemContainerStyle">
+			<Setter.Value>
+				<Style TargetType="{x:Type TabItem}">
+					<Setter Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowTabUnselectedBackground}}" />
+					<Setter Property="BorderBrush" Value="Transparent" />
+					<Setter Property="Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowTabUnselectedText}}" />
+					<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
+					<Setter Property="ToolTip" Value="{Binding ToolTip}" />
+					<Setter Property="Template">
+						<Setter.Value>
+							<ControlTemplate TargetType="{x:Type TabItem}">
+								<Grid SnapsToDevicePixels="true">
+									<Border
+										x:Name="SelectedBD"
+										Margin="1,-1,1,0"                                        
+										BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowTabSelectedActiveBackground}}"
+										BorderThickness="0,1,0,0"
+										Visibility="Collapsed" />
+									<Border
+										x:Name="Bd"
+										Margin="0"
+                                        CornerRadius="0 0 5 5"
+										Background="{TemplateBinding Background}"
+										BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.PanelBorderBrush}}">
+										<ContentPresenter
+											x:Name="Content"
+											Margin="6,2"
+											HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
+											VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
+											ContentSource="Header"
+											RecognizesAccessKey="True"
+											SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+									</Border>
+								</Grid>
+								<ControlTemplate.Triggers>
+									<Trigger Property="Selector.IsSelected" Value="true">
+										<Setter TargetName="SelectedBD" Property="Visibility" Value="Visible" />
+										<Setter TargetName="Bd" Property="BorderThickness" Value="1,0,1,1" />
+										<Setter Property="Panel.ZIndex" Value="1" />
+									</Trigger>
+
+									<!--  Tool Window : Tab / Selected, active  -->
+									<MultiDataTrigger>
+										<MultiDataTrigger.Conditions>
+											<Condition Binding="{Binding IsSelected}" Value="True" />
+											<Condition Binding="{Binding IsActive}" Value="True" />
+										</MultiDataTrigger.Conditions>
+										<Setter Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowTabSelectedActiveBackground}}" />
+										<Setter Property="Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowTabSelectedActiveText}}" />
+									</MultiDataTrigger>
+
+									<!--  Tool Window : Tab / Selected, inactive  -->
+									<MultiDataTrigger>
+										<MultiDataTrigger.Conditions>
+											<Condition Binding="{Binding IsSelected}" Value="True" />
+											<Condition Binding="{Binding IsActive}" Value="False" />
+										</MultiDataTrigger.Conditions>
+										<Setter Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowTabSelectedInactiveBackground}}" />
+										<Setter Property="Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowTabSelectedInactiveText}}" />
+									</MultiDataTrigger>
+
+									<!--  Tool Window : Tab / Unselected, hovered  -->
+									<MultiTrigger>
+										<MultiTrigger.Conditions>
+											<Condition Property="IsMouseOver" Value="true" />
+											<Condition Property="Selector.IsSelected" Value="false" />
+										</MultiTrigger.Conditions>
+										<Setter Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowTabUnselectedHoveredBackground}}" />
+										<Setter Property="Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowTabUnselectedHoveredText}}" />
+										<Setter Property="Panel.ZIndex" Value="0" />
+									</MultiTrigger>
+
+									<Trigger Property="IsEnabled" Value="false">
+										<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
+									</Trigger>
+								</ControlTemplate.Triggers>
+							</ControlTemplate>
+						</Setter.Value>
+					</Setter>
+					<Style.Triggers>
+						<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type TabControl}}, Path=Items.Count}" Value="1">
+							<Setter Property="Visibility" Value="Collapsed" />
+						</DataTrigger>
+					</Style.Triggers>
+				</Style>
+			</Setter.Value>
+		</Setter>
+
+		<Setter Property="ItemTemplate">
+			<Setter.Value>
+				<DataTemplate>
+					<avalonDockControls:LayoutAnchorableTabItem Model="{Binding}" />
+				</DataTemplate>
+			</Setter.Value>
+		</Setter>
+
+		<Setter Property="ContentTemplate">
+			<Setter.Value>
+				<DataTemplate>
+					<avalonDockControls:LayoutAnchorableControl Model="{Binding}" />
+				</DataTemplate>
+			</Setter.Value>
+		</Setter>
+	</Style>
+
+	<Style TargetType="avalonDockControls:AnchorablePaneTitle">
+		<Setter Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionInactiveBackground}}" />
+		<Setter Property="Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionInactiveText}}" />
+		<Setter Property="Template">
+			<Setter.Value>
+				<ControlTemplate>
+					<Border
+						Background="{TemplateBinding Background}"
+						BorderBrush="{TemplateBinding BorderBrush}"
+                        CornerRadius="5 5 0 0"
+						BorderThickness="{TemplateBinding BorderThickness}">
+						<Grid Margin="2,3">
+							<Grid.ColumnDefinitions>
+								<ColumnDefinition Width="*" />
+								<ColumnDefinition Width="Auto" />
+								<ColumnDefinition Width="Auto" />
+								<ColumnDefinition Width="Auto" />
+							</Grid.ColumnDefinitions>
+							<Rectangle
+								x:Name="DragHandleGeometryPlaceholder"
+								Fill="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionInactiveGrip}}"
+								Visibility="Collapsed" />
+							<Rectangle
+								x:Name="DragHandleTexture"
+								Height="5"
+								Margin="8,0,4,0"
+								VerticalAlignment="Center">
+								<Rectangle.Fill>
+									<DrawingBrush
+										TileMode="Tile"
+										Viewbox="0,0,4,5"
+										ViewboxUnits="Absolute"
+										Viewport="0,0,4,5"
+										ViewportUnits="Absolute">
+										<DrawingBrush.Drawing>
+											<GeometryDrawing Brush="{Binding Fill, ElementName=DragHandleGeometryPlaceholder, Mode=OneWay, Converter={avalonDockConverters:NullToDoNothingConverter}}">
+												<GeometryDrawing.Geometry>
+													<GeometryGroup>
+														<GeometryGroup.Children>
+															<RectangleGeometry Rect="0,0,1,1" />
+															<RectangleGeometry Rect="0,4,1,1" />
+															<RectangleGeometry Rect="2,2,1,1" />
+														</GeometryGroup.Children>
+													</GeometryGroup>
+												</GeometryDrawing.Geometry>
+											</GeometryDrawing>
+										</DrawingBrush.Drawing>
+									</DrawingBrush>
+								</Rectangle.Fill>
+							</Rectangle>
+							<Border
+								Padding="5,0"
+								HorizontalAlignment="Left"
+								Background="{TemplateBinding Background}">
+								<avalonDockControls:DropDownControlArea
+									DropDownContextMenu="{Binding Model.Root.Manager.AnchorableContextMenu, RelativeSource={RelativeSource TemplatedParent}}"
+									DropDownContextMenuDataContext="{Binding Path=LayoutItem, RelativeSource={RelativeSource TemplatedParent}}"
+									Style="{DynamicResource DropDownControlArea}">
+									<ContentPresenter
+										x:Name="Header"
+										Margin="2,0,0,0"
+										Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}"
+										ContentTemplate="{Binding Model.Root.Manager.AnchorableTitleTemplate, RelativeSource={RelativeSource TemplatedParent}}"
+										ContentTemplateSelector="{Binding Model.Root.Manager.AnchorableTitleTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}"
+										TextElement.Foreground="{TemplateBinding Foreground}" />
+								</avalonDockControls:DropDownControlArea>
+							</Border>
+							<avalonDockControls:DropDownButton
+								x:Name="MenuDropDownButton"
+								Grid.Column="1"
+								Margin="2,0"
+								VerticalAlignment="Center"
+								DropDownContextMenu="{Binding Model.Root.Manager.AnchorableContextMenu, RelativeSource={RelativeSource TemplatedParent}}"
+								DropDownContextMenuDataContext="{Binding Path=LayoutItem, RelativeSource={RelativeSource TemplatedParent}}"
+								Focusable="False"
+								Style="{StaticResource PixiEditorDockThemeToolButtonStyle}"
+								ToolTip="{x:Static avalonDockProperties:Resources.Anchorable_CxMenu_Hint}">
+								<Path
+									x:Name="PART_ImgMenuPin"
+									Width="10"
+									Height="13"
+									Data="{DynamicResource PinMenu}"
+									Fill="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveGlyph}}"
+									Stretch="Uniform" />
+							</avalonDockControls:DropDownButton>
+
+							<Button
+								x:Name="PART_AutoHidePin"
+								Grid.Column="2"
+								Margin="2,0"
+								HorizontalAlignment="Center"
+								VerticalAlignment="Center"
+								Command="{Binding Path=LayoutItem.AutoHideCommand, RelativeSource={RelativeSource TemplatedParent}}"
+								Focusable="False"
+								Style="{StaticResource PixiEditorDockThemeButtonStyle}"
+								ToolTip="{x:Static avalonDockProperties:Resources.Anchorable_BtnAutoHide_Hint}"
+								Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={avalonDockConverters:BoolToVisibilityConverter}}">
+								<Path
+									x:Name="PART_ImgAutoHidePin"
+									Width="10"
+									Height="13"
+									Data="{DynamicResource PinAutoHide}"
+									Fill="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveGlyph}}"
+									Stretch="Uniform" />
+							</Button>
+							<Button
+								x:Name="PART_HidePin"
+								Grid.Column="3"
+								Margin="2,0"
+								HorizontalAlignment="Center"
+								VerticalAlignment="Center"
+								Command="{Binding Path=LayoutItem.HideCommand, RelativeSource={RelativeSource TemplatedParent}}"
+								Focusable="False"
+								Style="{StaticResource PixiEditorDockThemeButtonStyle}"
+								ToolTip="{x:Static avalonDockProperties:Resources.Anchorable_BtnClose_Hint}"
+								Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={avalonDockConverters:BoolToVisibilityConverter}}">
+								<Path
+									x:Name="PART_ImgHidePin"
+									Width="10"
+									Height="10"
+									VerticalAlignment="Center"
+									Data="{DynamicResource PinClose}"
+									Fill="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveGlyph}}"
+									Stretch="Uniform" />
+							</Button>
+
+						</Grid>
+					</Border>
+					<ControlTemplate.Triggers>
+						<DataTrigger Binding="{Binding Model.IsAutoHidden, RelativeSource={RelativeSource Mode=Self}}" Value="True">
+							<Setter TargetName="PART_AutoHidePin" Property="LayoutTransform">
+								<Setter.Value>
+									<RotateTransform Angle="90" />
+								</Setter.Value>
+							</Setter>
+						</DataTrigger>
+
+						<DataTrigger Binding="{Binding Model.CanClose, RelativeSource={RelativeSource Mode=Self}}" Value="True">
+							<Setter TargetName="PART_HidePin" Property="Command" Value="{Binding Path=LayoutItem.CloseCommand, RelativeSource={RelativeSource TemplatedParent}}" />
+							<Setter TargetName="PART_HidePin" Property="ToolTip" Value="{x:Static avalonDockProperties:Resources.Document_Close}" />
+						</DataTrigger>
+
+						<!--  Tool Window : Caption / Active  -->
+						<DataTrigger Binding="{Binding Model.IsActive, RelativeSource={RelativeSource Mode=Self}}" Value="True">
+							<Setter Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionActiveBackground}}" />
+							<Setter Property="Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionActiveText}}" />
+							<Setter TargetName="DragHandleGeometryPlaceholder" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionActiveGrip}}" />
+						</DataTrigger>
+
+						<!--  Tool Window : Caption : Button / Active  -->
+						<DataTrigger Binding="{Binding Model.IsActive, RelativeSource={RelativeSource Mode=Self}}" Value="True">
+							<Setter TargetName="PART_ImgMenuPin" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActiveGlyph}}" />
+							<Setter TargetName="PART_ImgAutoHidePin" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActiveGlyph}}" />
+							<Setter TargetName="PART_ImgHidePin" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActiveGlyph}}" />
+						</DataTrigger>
+
+						<!--  Tool Window : Caption : Button / Active, hovered  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseOver, ElementName=MenuDropDownButton}" Value="True" />
+								<Condition Binding="{Binding Model.IsActive, RelativeSource={RelativeSource Mode=Self}}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="MenuDropDownButton" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActiveHoveredBackground}}" />
+							<Setter TargetName="MenuDropDownButton" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgMenuPin" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseOver, ElementName=PART_AutoHidePin}" Value="True" />
+								<Condition Binding="{Binding Model.IsActive, RelativeSource={RelativeSource Mode=Self}}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_AutoHidePin" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActiveHoveredBackground}}" />
+							<Setter TargetName="PART_AutoHidePin" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgAutoHidePin" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseOver, ElementName=PART_HidePin}" Value="True" />
+								<Condition Binding="{Binding Model.IsActive, RelativeSource={RelativeSource Mode=Self}}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_HidePin" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActiveHoveredBackground}}" />
+							<Setter TargetName="PART_HidePin" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgHidePin" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Tool Window : Caption : Button / Inactive, hovered  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseOver, ElementName=MenuDropDownButton}" Value="True" />
+								<Condition Binding="{Binding Model.IsActive, RelativeSource={RelativeSource Mode=Self}}" Value="False" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="MenuDropDownButton" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveHoveredBackground}}" />
+							<Setter TargetName="MenuDropDownButton" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgMenuPin" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseOver, ElementName=PART_AutoHidePin}" Value="True" />
+								<Condition Binding="{Binding Model.IsActive, RelativeSource={RelativeSource Mode=Self}}" Value="False" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_AutoHidePin" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveHoveredBackground}}" />
+							<Setter TargetName="PART_AutoHidePin" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgAutoHidePin" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseOver, ElementName=PART_HidePin}" Value="True" />
+								<Condition Binding="{Binding Model.IsActive, RelativeSource={RelativeSource Mode=Self}}" Value="False" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_HidePin" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveHoveredBackground}}" />
+							<Setter TargetName="PART_HidePin" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgHidePin" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Tool Window : Caption : Button / Active / Inactive, pressed  -->
+						<Trigger SourceName="MenuDropDownButton" Property="IsChecked" Value="True">
+							<Setter TargetName="MenuDropDownButton" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActivePressedBackground}}" />
+							<Setter TargetName="MenuDropDownButton" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActivePressedBorder}}" />
+							<Setter TargetName="PART_ImgMenuPin" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActivePressedGlyph}}" />
+						</Trigger>
+						<Trigger SourceName="PART_AutoHidePin" Property="IsMouseCaptured" Value="True">
+							<Setter TargetName="PART_AutoHidePin" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActivePressedBackground}}" />
+							<Setter TargetName="PART_AutoHidePin" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActivePressedBorder}}" />
+							<Setter TargetName="PART_ImgAutoHidePin" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActivePressedGlyph}}" />
+						</Trigger>
+						<Trigger SourceName="PART_HidePin" Property="IsMouseCaptured" Value="True">
+							<Setter TargetName="PART_HidePin" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActivePressedBackground}}" />
+							<Setter TargetName="PART_HidePin" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActivePressedBorder}}" />
+							<Setter TargetName="PART_ImgHidePin" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonActivePressedGlyph}}" />
+						</Trigger>
+					</ControlTemplate.Triggers>
+				</ControlTemplate>
+			</Setter.Value>
+		</Setter>
+	</Style>
+
+	<ControlTemplate x:Key="PixiEditorDockThemeAnchorSideTemplate" TargetType="{x:Type avalonDockControls:LayoutAnchorSideControl}">
+		<ItemsControl ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Children}">
+			<ItemsControl.ItemsPanel>
+				<ItemsPanelTemplate>
+					<StackPanel
+						MinWidth="4"
+						MinHeight="4"
+						Orientation="{Binding Path=Model.Side, RelativeSource={RelativeSource AncestorType={x:Type avalonDockControls:LayoutAnchorSideControl}, Mode=FindAncestor}, Converter={avalonDockConverters:AnchorSideToOrientationConverter}}" />
+				</ItemsPanelTemplate>
+			</ItemsControl.ItemsPanel>
+		</ItemsControl>
+	</ControlTemplate>
+
+	<ControlTemplate x:Key="PixiEditorDockThemeAnchorGroupTemplate" TargetType="{x:Type avalonDockControls:LayoutAnchorGroupControl}">
+		<ItemsControl ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Children}">
+			<ItemsControl.LayoutTransform>
+				<RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Model.Parent.Side, Converter={avalonDockConverters:AnchorSideToAngleConverter}}" />
+			</ItemsControl.LayoutTransform>
+			<ItemsControl.ItemsPanel>
+				<ItemsPanelTemplate>
+					<StackPanel Orientation="Horizontal" />
+				</ItemsPanelTemplate>
+			</ItemsControl.ItemsPanel>
+		</ItemsControl>
+	</ControlTemplate>
+
+	<ControlTemplate x:Key="PixiEditorDockThemeAnchorTemplate" TargetType="{x:Type avalonDockControls:LayoutAnchorControl}">
+		<Border
+			x:Name="Bd"
+			Margin="0,0,12,0"
+			Padding="0,3,0,3"
+			Background="{DynamicResource {x:Static reskeys:ResourceKeys.AutoHideTabDefaultBackground}}"
+			BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.AutoHideTabDefaultBorder}}"
+			BorderThickness="0,0,0,6"
+			TextElement.Foreground="{DynamicResource {x:Static reskeys:ResourceKeys.AutoHideTabDefaultText}}">
+			<ContentPresenter
+				Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}"
+				ContentTemplate="{Binding AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}"
+				ContentTemplateSelector="{Binding AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" />
+		</Border>
+		<ControlTemplate.Triggers>
+			<Trigger Property="Side" Value="Right">
+				<Setter TargetName="Bd" Property="BorderThickness" Value="0,6,0,0" />
+				<Setter TargetName="Bd" Property="Padding" Value="0,3,0,3" />
+			</Trigger>
+
+			<Trigger Property="Side" Value="Top">
+				<Setter TargetName="Bd" Property="BorderThickness" Value="0,6,0,0" />
+				<Setter TargetName="Bd" Property="Padding" Value="0,3,0,3" />
+			</Trigger>
+
+			<Trigger Property="IsMouseOver" Value="True">
+				<Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.AutoHideTabHoveredBackground}}" />
+				<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.AutoHideTabHoveredBorder}}" />
+				<Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.AutoHideTabHoveredText}}" />
+			</Trigger>
+
+		</ControlTemplate.Triggers>
+	</ControlTemplate>
+
+	<Style x:Key="{x:Type avalonDockControls:OverlayWindow}" TargetType="{x:Type avalonDockControls:OverlayWindow}">
+		<Setter Property="UseLayoutRounding" Value="True" />
+		<Setter Property="Background" Value="Transparent" />
+		<Setter Property="Template">
+			<Setter.Value>
+				<ControlTemplate TargetType="{x:Type avalonDockControls:OverlayWindow}">
+					<Canvas x:Name="PART_DropTargetsContainer" Opacity="0.9">
+						<!--
+							Drop target rectangle that is displayed before a document or tool window
+							is dropped into a drop target location
+						-->
+						<Path
+							x:Name="PART_PreviewBox"
+							Fill="{DynamicResource {x:Static reskeys:ResourceKeys.PreviewBoxBackgroundBrushKey}}"
+							Stroke="{DynamicResource {x:Static reskeys:ResourceKeys.PreviewBoxBorderBrushKey}}"
+							StrokeThickness="0.5" />
+
+						<!--
+							Outmost Outter 4 overlay buttons that are displayed at border of MainWindow
+							when user drags tool window over another tool window or document and the
+							AvalonDock air space contains additional document(s) and tool windows (s).
+						-->
+						<Grid x:Name="PART_DockingManagerDropTargets">
+							<ContentControl
+								x:Name="PART_DockingManagerDropTargetLeft"
+								Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+								Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+								Margin="10"
+								HorizontalAlignment="Left"
+								VerticalAlignment="Center"
+								HorizontalContentAlignment="Stretch"
+								VerticalContentAlignment="Stretch"
+								Background="Transparent"
+								BorderBrush="Transparent"
+								Content="{StaticResource DockAnchorableLeft}" />
+
+							<ContentControl
+								x:Name="PART_DockingManagerDropTargetRight"
+								Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+								Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+								Margin="10"
+								HorizontalAlignment="Right"
+								VerticalAlignment="Center"
+								HorizontalContentAlignment="Stretch"
+								VerticalContentAlignment="Stretch"
+								Background="Transparent"
+								BorderBrush="Transparent"
+								Content="{StaticResource DockAnchorableRight}" />
+
+							<ContentControl
+								x:Name="PART_DockingManagerDropTargetBottom"
+								Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+								Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+								Margin="10"
+								HorizontalAlignment="Center"
+								VerticalAlignment="Bottom"
+								HorizontalContentAlignment="Stretch"
+								VerticalContentAlignment="Stretch"
+								Background="Transparent"
+								BorderBrush="Transparent"
+								Content="{StaticResource DockAnchorableBottom}" />
+
+							<ContentControl
+								x:Name="PART_DockingManagerDropTargetTop"
+								Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+								Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+								Margin="10"
+								HorizontalAlignment="Center"
+								VerticalAlignment="Top"
+								HorizontalContentAlignment="Stretch"
+								VerticalContentAlignment="Stretch"
+								Background="Transparent"
+								BorderBrush="Transparent"
+								Content="{StaticResource DockAnchorableTop}" />
+
+						</Grid>
+
+						<!--
+							Is displayed as center cross with a max of 5 buttons when a toolwindow is
+							dragged over another tool window
+						-->
+						<Grid x:Name="PART_AnchorablePaneDropTargets">
+							<!--  Gray Star Background  -->
+							<Path
+								Height="122"
+								Data="{DynamicResource DockPaneEmpty}"
+								Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}"
+								Stretch="Uniform"
+								Stroke="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBorderBrushKey}}"
+								StrokeThickness="1" />
+							<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
+								<Grid.ColumnDefinitions>
+									<ColumnDefinition />
+									<ColumnDefinition />
+									<ColumnDefinition />
+								</Grid.ColumnDefinitions>
+								<Grid.RowDefinitions>
+									<RowDefinition />
+									<RowDefinition />
+									<RowDefinition />
+								</Grid.RowDefinitions>
+								<!--  Inner 5 buttons of star shapped control  -->
+								<ContentControl
+									x:Name="PART_AnchorablePaneDropTargetTop"
+									Grid.Row="0"
+									Grid.Column="1"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentAsAnchorableTop}" />
+								<ContentControl
+									x:Name="PART_AnchorablePaneDropTargetRight"
+									Grid.Row="1"
+									Grid.Column="2"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentAsAnchorableRight}" />
+								<ContentControl
+									x:Name="PART_AnchorablePaneDropTargetBottom"
+									Grid.Row="2"
+									Grid.Column="1"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentAsAnchorableBottom}" />
+								<ContentControl
+									x:Name="PART_AnchorablePaneDropTargetLeft"
+									Grid.Row="1"
+									Grid.Column="0"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentAsAnchorableLeft}" />
+								<!--  Center button of star shapped control  -->
+								<ContentControl
+									x:Name="PART_AnchorablePaneDropTargetInto"
+									Grid.Row="1"
+									Grid.Column="1"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentInside}" />
+							</Grid>
+						</Grid>
+
+						<!--  Is displayed as center cross with a max of 5 buttons when documents are dragged over the document container.  -->
+						<Grid x:Name="PART_DocumentPaneDropTargets">
+
+							<!--  Gray Star Background  -->
+							<Path
+								Height="122"
+								Data="{DynamicResource DockPaneEmpty}"
+								Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}"
+								Stretch="Uniform"
+								Stroke="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBorderBrushKey}}"
+								StrokeThickness="1" />
+
+							<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
+								<Grid.ColumnDefinitions>
+									<ColumnDefinition />
+									<ColumnDefinition />
+									<ColumnDefinition />
+								</Grid.ColumnDefinitions>
+								<Grid.RowDefinitions>
+									<RowDefinition />
+									<RowDefinition />
+									<RowDefinition />
+								</Grid.RowDefinitions>
+								<!--  Inner 5 buttons of star shapped control  -->
+								<ContentControl
+									x:Name="PART_DocumentPaneDropTargetTop"
+									Grid.Row="0"
+									Grid.Column="1"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentTop}" />
+								<ContentControl
+									x:Name="PART_DocumentPaneDropTargetRight"
+									Grid.Row="1"
+									Grid.Column="2"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentRight}" />
+								<ContentControl
+									x:Name="PART_DocumentPaneDropTargetBottom"
+									Grid.Row="2"
+									Grid.Column="1"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentBottom}" />
+								<ContentControl
+									x:Name="PART_DocumentPaneDropTargetLeft"
+									Grid.Row="1"
+									Grid.Column="0"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentLeft}" />
+								<!--  Center button of star shapped control  -->
+								<ContentControl
+									x:Name="PART_DocumentPaneDropTargetInto"
+									Grid.Row="1"
+									Grid.Column="1"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentInside}" />
+							</Grid>
+						</Grid>
+
+						<!--  Center star with a max of 9 buttons shown when tool window is dragged of document container  -->
+						<Grid x:Name="PART_DocumentPaneFullDropTargets">
+
+							<!--  Gray Star Background  -->
+							<Path
+								Width="204"
+								Data="{DynamicResource DockPaneLargeEmpty}"
+								Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}"
+								Stretch="Uniform"
+								Stroke="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBorderBrushKey}}"
+								StrokeThickness="1" />
+							<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
+								<Grid.ColumnDefinitions>
+									<ColumnDefinition />
+									<ColumnDefinition />
+									<ColumnDefinition />
+									<ColumnDefinition />
+									<ColumnDefinition />
+								</Grid.ColumnDefinitions>
+								<Grid.RowDefinitions>
+									<RowDefinition />
+									<RowDefinition />
+									<RowDefinition />
+									<RowDefinition />
+									<RowDefinition />
+								</Grid.RowDefinitions>
+								<!--  Inner 5 buttons of star shapped control  -->
+								<ContentControl
+									x:Name="PART_DocumentPaneFullDropTargetTop"
+									Grid.Row="1"
+									Grid.Column="2"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentTop}" />
+								<ContentControl
+									x:Name="PART_DocumentPaneFullDropTargetRight"
+									Grid.Row="2"
+									Grid.Column="3"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentRight}" />
+								<ContentControl
+									x:Name="PART_DocumentPaneFullDropTargetBottom"
+									Grid.Row="3"
+									Grid.Column="2"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentBottom}" />
+								<ContentControl
+									x:Name="PART_DocumentPaneFullDropTargetLeft"
+									Grid.Row="2"
+									Grid.Column="1"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentLeft}" />
+								<!--  Center button of star shapped control  -->
+								<ContentControl
+									x:Name="PART_DocumentPaneFullDropTargetInto"
+									Grid.Row="2"
+									Grid.Column="2"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentInside}" />
+
+								<!--  Outer 4 buttons of star shapped control  -->
+								<ContentControl
+									x:Name="PART_DocumentPaneDropTargetTopAsAnchorablePane"
+									Grid.Row="0"
+									Grid.Column="2"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentAsAnchorableTop}" />
+								<ContentControl
+									x:Name="PART_DocumentPaneDropTargetRightAsAnchorablePane"
+									Grid.Row="2"
+									Grid.Column="4"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentAsAnchorableRight}" />
+								<ContentControl
+									x:Name="PART_DocumentPaneDropTargetBottomAsAnchorablePane"
+									Grid.Row="4"
+									Grid.Column="2"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentAsAnchorableBottom}" />
+								<ContentControl
+									x:Name="PART_DocumentPaneDropTargetLeftAsAnchorablePane"
+									Grid.Row="2"
+									Grid.Column="0"
+									Width="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonWidthKey}}"
+									Height="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonHeightKey}}"
+									HorizontalContentAlignment="Stretch"
+									VerticalContentAlignment="Stretch"
+									Background="Transparent"
+									BorderBrush="Transparent"
+									Content="{StaticResource DockDocumentAsAnchorableLeft}" />
+							</Grid>
+						</Grid>
+					</Canvas>
+				</ControlTemplate>
+			</Setter.Value>
+		</Setter>
+	</Style>
+
+    <DataTemplate x:Key="PixiEditorDockThemeDocumentHeaderTemplate">
+		<TextBlock VerticalAlignment="Center" Text="{Binding Title}" TextTrimming="CharacterEllipsis" />
+    </DataTemplate>
+
+	<DataTemplate x:Key="PixiEditorDockThemeAnchorableHeaderTemplate">
+		<TextBlock
+			Margin="5,0"
+			Text="{Binding Title}"
+			TextTrimming="CharacterEllipsis" />
+	</DataTemplate>
+
+	<DataTemplate x:Key="PixiEditorDockThemeDocumentTitleTemplate">
+		<TextBlock
+			VerticalAlignment="Center"
+			Text="Canvas"
+			TextTrimming="CharacterEllipsis" />
+	</DataTemplate>
+
+	<DataTemplate x:Key="PixiEditorDockThemeAnchorableTitleTemplate">
+		<TextBlock
+			VerticalAlignment="Center"
+			Text="{Binding Title}"
+			TextTrimming="CharacterEllipsis" />
+	</DataTemplate>
+
+	<DataTemplate x:Key="PixiEditorDockThemeIconContentTemplate">
+		<Image Source="{Binding IconSource, Converter={avalonDockConverters:NullToDoNothingConverter}}" Stretch="Uniform" />
+	</DataTemplate>
+
+	<ContextMenu x:Key="PixiEditorDockThemeAnchorableContextMenu">
+		<MenuItem Command="{Binding Path=FloatCommand}" Header="{x:Static avalonDockProperties:Resources.Anchorable_Float}" />
+		<MenuItem Command="{Binding Path=DockCommand}" Header="{x:Static avalonDockProperties:Resources.Anchorable_Dock}" />
+		<MenuItem Command="{Binding Path=DockAsDocumentCommand}" Header="{x:Static avalonDockProperties:Resources.Anchorable_DockAsDocument}" />
+		<MenuItem Command="{Binding Path=AutoHideCommand}" Header="{x:Static avalonDockProperties:Resources.Anchorable_AutoHide}" />
+		<MenuItem
+			Command="{Binding Path=HideCommand}"
+			Header="{x:Static avalonDockProperties:Resources.Anchorable_Hide}"
+			Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={avalonDockConverters:BoolToVisibilityConverter}}" />
+	</ContextMenu>
+
+	<ContextMenu x:Key="PixiEditorDockThemeDocumentContextMenu">
+		<MenuItem
+			Command="{Binding Path=CloseCommand}"
+			Header="{x:Static avalonDockProperties:Resources.Document_Close}"
+			Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={avalonDockConverters:BoolToVisibilityConverter}}" />
+		<MenuItem Command="{Binding Path=CloseAllButThisCommand}" Header="{x:Static avalonDockProperties:Resources.Document_CloseAllButThis}" />
+		<MenuItem Command="{Binding Path=CloseAllCommand}" Header="{x:Static avalonDockProperties:Resources.Document_CloseAll}" />
+		<MenuItem Command="{Binding Path=FloatCommand}" Header="{x:Static avalonDockProperties:Resources.Document_Float}" />
+		<MenuItem Command="{Binding Path=DockAsDocumentCommand}" Header="{x:Static avalonDockProperties:Resources.Document_DockAsDocument}" />
+		<MenuItem
+			Command="{Binding Path=NewHorizontalTabGroupCommand}"
+			Header="{x:Static avalonDockProperties:Resources.Document_NewHorizontalTabGroup}"
+			Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={avalonDockConverters:BoolToVisibilityConverter}}">
+			<MenuItem.Icon>
+				<Path
+					Width="14"
+					Height="14"
+					VerticalAlignment="Center"
+					Data="{DynamicResource HTabGroup}"
+					Fill="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveGlyph}}"
+					Stretch="Uniform" />
+			</MenuItem.Icon>
+		</MenuItem>
+
+		<MenuItem
+			Command="{Binding Path=NewVerticalTabGroupCommand}"
+			Header="{x:Static avalonDockProperties:Resources.Document_NewVerticalTabGroup}"
+			Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={avalonDockConverters:BoolToVisibilityConverter}}">
+			<MenuItem.Icon>
+				<Path
+					Width="14"
+					Height="14"
+					VerticalAlignment="Center"
+					Data="{DynamicResource VTabGroup}"
+					Fill="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionButtonInactiveGlyph}}"
+					Stretch="Uniform" />
+			</MenuItem.Icon>
+		</MenuItem>
+		<MenuItem
+			Command="{Binding Path=MoveToNextTabGroupCommand}"
+			Header="{x:Static avalonDockProperties:Resources.Document_MoveToNextTabGroup}"
+			Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={avalonDockConverters:BoolToVisibilityConverter}}" />
+		<MenuItem
+			Command="{Binding Path=MoveToPreviousTabGroupCommand}"
+			Header="{x:Static avalonDockProperties:Resources.Document_MoveToPreviousTabGroup}"
+			Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={avalonDockConverters:BoolToVisibilityConverter}}" />
+	</ContextMenu>
+
+	<!--  DockingManager  -->
+	<Style x:Key="{x:Type avalonDock:DockingManager}" TargetType="{x:Type avalonDock:DockingManager}">
+		<Setter Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.Background}}" />
+		<Setter Property="DocumentPaneControlStyle" Value="{StaticResource PixiEditorDockThemeDocumentPaneControlStyle}" />
+		<Setter Property="AnchorablePaneControlStyle" Value="{StaticResource PixiEditorDockThemeAnchorablePaneControlStyle}" />
+		<Setter Property="AnchorSideTemplate" Value="{StaticResource PixiEditorDockThemeAnchorSideTemplate}" />
+		<Setter Property="AnchorGroupTemplate" Value="{StaticResource PixiEditorDockThemeAnchorGroupTemplate}" />
+		<Setter Property="AnchorTemplate" Value="{StaticResource PixiEditorDockThemeAnchorTemplate}" />
+		<Setter Property="DocumentHeaderTemplate" Value="{StaticResource PixiEditorDockThemeDocumentHeaderTemplate}" />
+		<Setter Property="AnchorableHeaderTemplate" Value="{StaticResource PixiEditorDockThemeAnchorableHeaderTemplate}" />
+		<Setter Property="DocumentTitleTemplate" Value="{StaticResource PixiEditorDockThemeDocumentTitleTemplate}" />
+		<Setter Property="AnchorableTitleTemplate" Value="{StaticResource PixiEditorDockThemeAnchorableTitleTemplate}" />
+		<Setter Property="AnchorableContextMenu" Value="{StaticResource PixiEditorDockThemeAnchorableContextMenu}" />
+		<Setter Property="DocumentContextMenu" Value="{StaticResource PixiEditorDockThemeDocumentContextMenu}" />
+		<Setter Property="DocumentPaneMenuItemHeaderTemplate" Value="{StaticResource PixiEditorDockThemeDocumentHeaderTemplate}" />
+		<Setter Property="IconContentTemplate" Value="{StaticResource PixiEditorDockThemeIconContentTemplate}" />
+		<Setter Property="GridSplitterWidth" Value="6" />
+		<Setter Property="GridSplitterHeight" Value="6" />
+	</Style>
+
+	<!--  LayoutGridResizerControl  -->
+	<Style x:Key="{x:Type avalonDockControls:LayoutGridResizerControl}" TargetType="{x:Type avalonDockControls:LayoutGridResizerControl}">
+		<Setter Property="Background" Value="Transparent" />
+		<Setter Property="Template">
+			<Setter.Value>
+				<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutGridResizerControl}">
+					<Border Background="Transparent" />
+				</ControlTemplate>
+			</Setter.Value>
+		</Setter>
+	</Style>
+
+    <Style TargetType="{x:Type avalonDockControls:LayoutDocumentControl}">
+        <Setter Property="Template">
+			<Setter.Value>
+				<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutDocumentControl}">
+					<Border
+						Background="{TemplateBinding Background}"
+						BorderBrush="{TemplateBinding BorderBrush}"
+						BorderThickness="{TemplateBinding BorderThickness}">
+						<ContentPresenter Content="{Binding LayoutItem.View, RelativeSource={RelativeSource TemplatedParent}}" />
+					</Border>
+				</ControlTemplate>
+			</Setter.Value>
+		</Setter>
+	</Style>
+
+	<Style TargetType="{x:Type avalonDockControls:LayoutDocumentTabItem}">
+		<Setter Property="Template">
+			<Setter.Value>
+				<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutDocumentTabItem}">
+					<avalonDockControls:DropDownControlArea
+						DropDownContextMenu="{Binding Root.Manager.DocumentContextMenu}"
+						DropDownContextMenuDataContext="{Binding LayoutItem, RelativeSource={RelativeSource TemplatedParent}}"
+						Style="{DynamicResource DropDownControlArea}">
+						<Border
+							Margin="0,3,0,3"
+							Background="{TemplateBinding Background}"
+							BorderBrush="{TemplateBinding BorderBrush}"
+							BorderThickness="{TemplateBinding BorderThickness}">
+							<Grid>
+								<Grid.ColumnDefinitions>
+									<ColumnDefinition Width="*" />
+									<ColumnDefinition Width="Auto" />
+								</Grid.ColumnDefinitions>
+								<Border Grid.ColumnSpan="2" Background="Transparent" />
+                                <StackPanel Orientation="Horizontal">
+                                    <Image Stretch="Uniform" Name="previewImage" Margin="1" Width="30" Height="20"
+                                           RenderOptions.BitmapScalingMode="NearestNeighbor"
+                                           Source="{Binding LayoutItem.Model.PreviewImage, RelativeSource={RelativeSource TemplatedParent}}"/>
+                                    <ContentPresenter
+									Margin="4,0"
+									Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}"
+									ContentTemplate="{Binding DocumentHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}"
+									ContentTemplateSelector="{Binding DocumentHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}"
+									TextBlock.Foreground="{Binding Foreground, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TabItem}}" />
+                                </StackPanel>
+                                <!--  Close button should be moved out to the container style  -->
+								<Button
+									x:Name="DocumentCloseButton"
+									Grid.Column="1"
+									Width="15"
+									Margin="3,0"
+									HorizontalAlignment="Center"
+									VerticalAlignment="Center"
+									Command="{Binding Path=LayoutItem.CloseCommand, RelativeSource={RelativeSource TemplatedParent}}"
+									Style="{StaticResource PixiEditorDockThemeButtonStyle}"
+									ToolTip="{x:Static avalonDockProperties:Resources.Document_Close}"
+									Visibility="Hidden">
+									<Path
+										x:Name="PART_ImgPinClose"
+										Width="10"
+										Height="10"
+										VerticalAlignment="Center"
+										Data="{DynamicResource PinClose}"
+										Fill="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionActiveText}}"
+										Stretch="Uniform" />
+								</Button>
+							</Grid>
+						</Border>
+					</avalonDockControls:DropDownControlArea>
+					<ControlTemplate.Triggers>
+						<!--  Close button visibility  -->
+						<DataTrigger Binding="{Binding Path=IsSelected}" Value="true">
+							<Setter TargetName="DocumentCloseButton" Property="Visibility" Value="Visible" />
+						</DataTrigger>
+						<Trigger Property="IsMouseOver" Value="True">
+							<Setter TargetName="DocumentCloseButton" Property="Visibility" Value="Visible" />
+						</Trigger>
+						<DataTrigger Binding="{Binding Path=IsLastFocusedDocument}" Value="true">
+							<Setter TargetName="DocumentCloseButton" Property="Visibility" Value="Visible" />
+						</DataTrigger>
+						<DataTrigger Binding="{Binding Path=IsActive}" Value="true">
+							<Setter TargetName="DocumentCloseButton" Property="Visibility" Value="Visible" />
+						</DataTrigger>
+						<!--BD: 17.08.2020 use HideCommand if CanClose=false but CanHide=true-->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+							<Condition Binding="{Binding Path=CanClose}" Value="false" />
+								<Condition Binding="{Binding Path=CanHide}" Value="true" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="DocumentCloseButton" Property="Command" Value="{Binding Path=LayoutItem.HideCommand, RelativeSource={RelativeSource TemplatedParent}}" />
+							<Setter TargetName="DocumentCloseButton" Property="ToolTip" Value="{x:Static avalonDockProperties:Resources.Anchorable_Hide}" />
+						</MultiDataTrigger>
+						<!--BD: 17.08.2020 hide button if both CanClose=false and CanHide=false-->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding Path=CanClose}" Value="false" />
+								<Condition Binding="{Binding Path=CanHide}" Value="false" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="DocumentCloseButton" Property="Visibility" Value="Collapsed" />
+						</MultiDataTrigger>
+
+						<!--  Document Well : Tab : Button / Selected, inactive  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsLastFocusedDocument}" Value="true" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundArrowBrushKey}}" />
+						</MultiDataTrigger>
+
+						<!--  Document Well : Tab : Button / Selected, inactive, hovered  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsLastFocusedDocument}" Value="true" />
+								<Condition Binding="{Binding IsMouseOver, ElementName=DocumentCloseButton}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="DocumentCloseButton" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBackground}}" />
+							<Setter TargetName="DocumentCloseButton" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundArrowBrushKey}}" />
+						</MultiDataTrigger>
+
+						<!--  Document Well : Tab : Button / Selected, inactive, pressed  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsLastFocusedDocument}" Value="true" />
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=DocumentCloseButton}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="DocumentCloseButton" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBackground}}" />
+							<Setter TargetName="DocumentCloseButton" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Document Well : Tab : Button / Selected, active  -->
+						<DataTrigger Binding="{Binding IsActive}" Value="true">
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundArrowBrushKey}}" />
+						</DataTrigger>
+
+						<!--  Document Well : Tab : Button / Selected, active, hovered  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsActive}" Value="true" />
+								<Condition Binding="{Binding IsMouseOver, ElementName=DocumentCloseButton}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="DocumentCloseButton" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBackground}}" />
+							<Setter TargetName="DocumentCloseButton" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Document Well : Tab : Button / Selected, active, pressed  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsActive}" Value="true" />
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=DocumentCloseButton}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="DocumentCloseButton" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBackground}}" />
+							<Setter TargetName="DocumentCloseButton" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Document Well : Tab : Button / Unselected, tab hovered  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsActive}" Value="False" />
+								<Condition Binding="{Binding IsLastFocusedDocument}" Value="False" />
+								<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource TemplatedParent}}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonUnselectedTabHoveredGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Document Well : Tab : Button / Unselected, tab hovered, button hovered  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsActive}" Value="False" />
+								<Condition Binding="{Binding IsLastFocusedDocument}" Value="False" />
+								<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource TemplatedParent}}" Value="True" />
+								<Condition Binding="{Binding IsMouseOver, ElementName=DocumentCloseButton}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="DocumentCloseButton" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonUnselectedTabHoveredButtonHoveredBackground}}" />
+							<Setter TargetName="DocumentCloseButton" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonUnselectedTabHoveredButtonHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonUnselectedTabHoveredButtonHoveredGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Document Well : Tab : Button / Unselected, tab hovered, button pressed  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsActive}" Value="False" />
+								<Condition Binding="{Binding IsLastFocusedDocument}" Value="False" />
+								<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource TemplatedParent}}" Value="True" />
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=DocumentCloseButton}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="DocumentCloseButton" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonUnselectedTabHoveredButtonPressedBackground}}" />
+							<Setter TargetName="DocumentCloseButton" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonUnselectedTabHoveredButtonPressedBorder}}" />
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonUnselectedTabHoveredButtonPressedGlyph}}" />
+						</MultiDataTrigger>
+					</ControlTemplate.Triggers>
+				</ControlTemplate>
+			</Setter.Value>
+		</Setter>
+	</Style>
+
+	<Style TargetType="{x:Type avalonDockControls:LayoutAnchorableTabItem}">
+		<Setter Property="Template">
+			<Setter.Value>
+				<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutAnchorableTabItem}">
+					<avalonDockControls:DropDownControlArea
+						DropDownContextMenu="{Binding Root.Manager.AnchorableContextMenu}"
+						DropDownContextMenuDataContext="{Binding LayoutItem, RelativeSource={RelativeSource TemplatedParent}}"
+						Style="{DynamicResource DropDownControlArea}">
+						<Border
+							Background="{TemplateBinding Background}"
+							BorderBrush="{TemplateBinding BorderBrush}"
+							BorderThickness="{TemplateBinding BorderThickness}">
+							<Grid>
+								<ContentPresenter
+									Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}"
+									ContentTemplate="{Binding AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}"
+									ContentTemplateSelector="{Binding AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" />
+								<avalonDockControls:DropDownControlArea
+									Grid.Column="0"
+									DropDownContextMenu="{Binding Model.Root.Manager.AnchorableContextMenu, RelativeSource={RelativeSource TemplatedParent}}"
+									DropDownContextMenuDataContext="{Binding Path=Model, RelativeSource={RelativeSource TemplatedParent}}" />
+							</Grid>
+						</Border>
+					</avalonDockControls:DropDownControlArea>
+				</ControlTemplate>
+			</Setter.Value>
+		</Setter>
+	</Style>
+
+	<Style TargetType="{x:Type avalonDockControls:LayoutAnchorableControl}">
+		<Setter Property="Template">
+			<Setter.Value>
+				<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutAnchorableControl}">
+					<Border
+						x:Name="Bd"
+						Background="{TemplateBinding Background}"
+						BorderBrush="{TemplateBinding BorderBrush}"
+						BorderThickness="{TemplateBinding BorderThickness}">
+						<Grid>
+							<Grid.RowDefinitions>
+								<RowDefinition Height="Auto" />
+								<RowDefinition Height="*" />
+							</Grid.RowDefinitions>
+							<Border x:Name="Header">
+								<avalonDockControls:AnchorablePaneTitle Model="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" />
+							</Border>
+							<!--
+								Added ContentTemplate and ContentTemplateSelector
+								https://github.com/xceedsoftware/wpftoolkit/issues/1525
+							-->
+							<ContentPresenter
+								Grid.Row="1"
+								Content="{Binding LayoutItem.View, RelativeSource={RelativeSource TemplatedParent}}"
+								ContentTemplate="{Binding LayoutItem.View.ContentTemplate, RelativeSource={RelativeSource TemplatedParent}}"
+								ContentTemplateSelector="{Binding LayoutItem.View.ContentTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}"
+								FlowDirection="{TemplateBinding FlowDirection}" />
+
+							<!--
+                                <ContentPresenter
+                                Content="{Binding Model.Content, RelativeSource={RelativeSource TemplatedParent}}"
+                                ContentTemplate="{Binding LayoutItemTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}"
+                                ContentTemplateSelector="{Binding LayoutItemTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}"
+                                Grid.Row="1"/>
+							-->
+						</Grid>
+					</Border>
+					<ControlTemplate.Triggers>
+						<!--
+							Hide the title if the control is directly hosted in floating window
+							The floating window control will show the title if there is only one control to host
+							without any other LayoutAnchorableControl
+						-->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.IsFloating}" Value="True" />
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.Parent.IsDirectlyHostedInFloatingWindow}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="Header" Property="Visibility" Value="Collapsed" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<!--
+								Also hide the title, if model cannot be bound which can happen when using virtualization
+								See Issue #148 Drop Down Menu for LayoutAnchorables is not correct with Virtualization
+							-->
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model}" Value="{x:Null}" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="Header" Property="Visibility" Value="Collapsed" />
+						</MultiDataTrigger>
+					</ControlTemplate.Triggers>
+				</ControlTemplate>
+			</Setter.Value>
+		</Setter>
+	</Style>
+
+	<Style x:Key="{x:Type avalonDockControls:LayoutDocumentFloatingWindowControl}" TargetType="{x:Type avalonDockControls:LayoutDocumentFloatingWindowControl}">
+		<Setter Property="UseLayoutRounding" Value="True" />
+		<Setter Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.FloatingDocumentWindowBackground}}" />
+		<Setter Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.FloatingDocumentWindowBorder}}" />
+		<Setter Property="shell:WindowChrome.WindowChrome">
+			<Setter.Value>
+				<shell:WindowChrome
+					CaptionHeight="24"
+					CornerRadius="0"
+					GlassFrameThickness="0"
+					ResizeBorderThickness="10"
+					ShowSystemMenu="False" />
+			</Setter.Value>
+		</Setter>
+		<Setter Property="Template">
+			<Setter.Value>
+				<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutDocumentFloatingWindowControl}">
+					<Grid>
+						<Border
+							x:Name="WindowBorder"
+							Background="{TemplateBinding Background}"
+							BorderBrush="{TemplateBinding BorderBrush}"
+							BorderThickness="1">
+							<Grid>
+								<Grid.RowDefinitions>
+									<RowDefinition Height="Auto" MinHeight="24" />
+									<!--  https://github.com/xceedsoftware/wpftoolkit/issues/1203  -->
+									<RowDefinition Height="*" />
+								</Grid.RowDefinitions>
+
+								<Border
+									x:Name="Header"
+									Padding="2,0,2,0"
+									Background="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabSelectedInactiveBackground}}"
+									TextElement.Foreground="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabSelectedInactiveText}}">
+									<Grid UseLayoutRounding="True">
+										<Grid.ColumnDefinitions>
+											<ColumnDefinition Width="*" />
+											<ColumnDefinition Width="Auto" />
+											<ColumnDefinition Width="Auto" />
+										</Grid.ColumnDefinitions>
+										<ContentPresenter
+											Content="{Binding Model.SinglePane.SelectedContent, RelativeSource={RelativeSource TemplatedParent}}"
+											ContentTemplate="{Binding Model.Root.Manager.DocumentTitleTemplate, RelativeSource={RelativeSource TemplatedParent}}"
+											ContentTemplateSelector="{Binding Model.Root.Manager.DocumentTitleTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}" />
+
+										<Button
+											x:Name="PART_PinMaximize"
+											Grid.Column="1"
+											Margin="5,0"
+											HorizontalAlignment="Center"
+											VerticalAlignment="Center"
+											shell:WindowChrome.IsHitTestVisibleInChrome="True"
+											Command="{x:Static shell:SystemCommands.MaximizeWindowCommand}"
+											CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
+											Focusable="False"
+											Style="{StaticResource PixiEditorDockThemeButtonStyle}"
+											ToolTip="{x:Static avalonDockProperties:Resources.Window_Maximize}"
+											Visibility="{Binding IsMaximized, RelativeSource={RelativeSource TemplatedParent}, Converter={avalonDockConverters:InverseBoolToVisibilityConverter}}">
+											<Path
+												x:Name="PART_ImgPinMaximize"
+												Width="12"
+												Height="12"
+												VerticalAlignment="Center"
+												Data="{DynamicResource PinMaximize}"
+												Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveGlyph}}"
+												Stretch="Uniform" />
+										</Button>
+
+										<Button
+											x:Name="PART_PinRestore"
+											Grid.Column="1"
+											Margin="5,0"
+											HorizontalAlignment="Center"
+											VerticalAlignment="Center"
+											shell:WindowChrome.IsHitTestVisibleInChrome="True"
+											Command="{x:Static shell:SystemCommands.RestoreWindowCommand}"
+											CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
+											Focusable="False"
+											Style="{StaticResource PixiEditorDockThemeButtonStyle}"
+											ToolTip="{x:Static avalonDockProperties:Resources.Window_Restore}"
+											Visibility="{Binding IsMaximized, RelativeSource={RelativeSource TemplatedParent}, Converter={avalonDockConverters:BoolToVisibilityConverter}}">
+											<Path
+												x:Name="PART_ImgPinRestore"
+												Width="13"
+												Height="13"
+												VerticalAlignment="Center"
+												Data="{DynamicResource PinRestore}"
+												Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveGlyph}}"
+												Stretch="Uniform" />
+										</Button>
+
+										<Button
+											x:Name="PART_PinClose"
+											Grid.Column="2"
+											HorizontalAlignment="Center"
+											VerticalAlignment="Center"
+											shell:WindowChrome.IsHitTestVisibleInChrome="True"
+											Command="{Binding Path=CloseWindowCommand, RelativeSource={RelativeSource TemplatedParent}}"
+											Focusable="False"
+											Style="{StaticResource PixiEditorDockThemeButtonStyle}"
+											ToolTip="{x:Static avalonDockProperties:Resources.Document_Close}"
+											Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={avalonDockConverters:BoolToVisibilityConverter}}">
+											<Path
+												x:Name="PART_ImgPinClose"
+												Width="12"
+												Height="12"
+												VerticalAlignment="Center"
+												Data="{DynamicResource PinClose}"
+												Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveGlyph}}"
+												Stretch="Uniform" />
+										</Button>
+									</Grid>
+								</Border>
+								<ContentPresenter Grid.Row="1" Content="{TemplateBinding Content}" />
+							</Grid>
+						</Border>
+					</Grid>
+					<ControlTemplate.Triggers>
+						<!--  Show Header Bar (Window Title and Restore/Maximize/Minimize buttons with highlighting color if this IsActive)  -->
+						<Trigger Property="WindowState" Value="Maximized">
+							<Setter TargetName="WindowBorder" Property="Padding" Value="3" />
+						</Trigger>
+						<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsActive}" Value="True">
+							<Setter TargetName="Header" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabSelectedActiveBackground}}" />
+							<Setter TargetName="Header" Property="TextElement.Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabSelectedActiveText}}" />
+						</DataTrigger>
+
+						<!--  Document Well : Tab : Button / Selected, inactive, hovered  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseOver, ElementName=PART_PinMaximize}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinMaximize" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBackground}}" />
+							<Setter TargetName="PART_PinMaximize" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinMaximize" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseOver, ElementName=PART_PinRestore}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinRestore" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBackground}}" />
+							<Setter TargetName="PART_PinRestore" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinRestore" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseOver, ElementName=PART_PinClose}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinClose" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBackground}}" />
+							<Setter TargetName="PART_PinClose" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Document Well : Tab : Button / Selected, inactive, pressed  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=PART_PinMaximize}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinMaximize" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBackground}}" />
+							<Setter TargetName="PART_PinMaximize" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinMaximize" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=PART_PinRestore}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinRestore" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBackground}}" />
+							<Setter TargetName="PART_PinRestore" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinRestore" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=PART_PinClose}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinClose" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBackground}}" />
+							<Setter TargetName="PART_PinClose" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Mark Active Document on CLick in Document Well : Tab : Button / Selected, active  -->
+						<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsActive}" Value="true">
+							<!--  Setter TargetName="PART_ImgPinMenu" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveGlyph}}" /  -->
+							<Setter TargetName="PART_ImgPinMaximize" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveGlyph}}" />
+							<Setter TargetName="PART_ImgPinRestore" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveGlyph}}" />
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveGlyph}}" />
+						</DataTrigger>
+
+						<!--  Document Well : Tab : Button / Selected, active, hovered  -->
+						<!--  Highlight Maximize Button of Floating Window on MouseOver  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsActive}" Value="true" />
+								<Condition Binding="{Binding IsMouseOver, ElementName=PART_PinMaximize}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinMaximize" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBackground}}" />
+							<Setter TargetName="PART_PinMaximize" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinMaximize" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Highlight Restore Button of Floating Window on MouseOver  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsActive}" Value="true" />
+								<Condition Binding="{Binding IsMouseOver, ElementName=PART_PinRestore}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinRestore" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBackground}}" />
+							<Setter TargetName="PART_PinRestore" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinRestore" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Highlight Close Button of Floating Window on MouseOver  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsActive}" Value="true" />
+								<Condition Binding="{Binding IsMouseOver, ElementName=PART_PinClose}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinClose" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBackground}}" />
+							<Setter TargetName="PART_PinClose" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Document Well : Tab : Button / Selected, active, pressed  -->
+						<!--  Highlight Maximize Button of Floating Window on MouseClick and Holding Bottun (even when Mouse is moved away)  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsActive}" Value="true" />
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=PART_PinMaximize}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinMaximize" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBackground}}" />
+							<Setter TargetName="PART_PinMaximize" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinMaximize" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Highlight Restore Button of Floating Window on MouseClick and Holding Bottun (even when Mouse is moved away)  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsActive}" Value="true" />
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=PART_PinRestore}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinRestore" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBackground}}" />
+							<Setter TargetName="PART_PinRestore" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinRestore" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Highlight Close Button of Floating Window on MouseClick and Holding Bottun (even when Mouse is moved away)  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsActive}" Value="true" />
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=PART_PinClose}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinClose" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBackground}}" />
+							<Setter TargetName="PART_PinClose" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedGlyph}}" />
+						</MultiDataTrigger>
+					</ControlTemplate.Triggers>
+				</ControlTemplate>
+
+			</Setter.Value>
+		</Setter>
+	</Style>
+
+	<Style x:Key="{x:Type avalonDockControls:LayoutAnchorableFloatingWindowControl}" TargetType="{x:Type avalonDockControls:LayoutAnchorableFloatingWindowControl}">
+		<Setter Property="UseLayoutRounding" Value="True" />
+		<Setter Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.FloatingToolWindowBackground}}" />
+		<Setter Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.FloatingToolWindowBorder}}" />
+		<Setter Property="shell:WindowChrome.WindowChrome">
+			<Setter.Value>
+				<shell:WindowChrome
+					CaptionHeight="24"
+					CornerRadius="0"
+					GlassFrameThickness="0"
+					ResizeBorderThickness="10" />
+			</Setter.Value>
+		</Setter>
+		<Setter Property="Template">
+			<Setter.Value>
+				<ControlTemplate TargetType="{x:Type avalonDockControls:LayoutAnchorableFloatingWindowControl}">
+					<Grid>
+						<Border
+							x:Name="WindowBorder"
+							Background="{TemplateBinding Background}"
+							BorderBrush="{TemplateBinding BorderBrush}"
+							BorderThickness="1">
+							<Grid>
+								<Grid.RowDefinitions>
+									<RowDefinition Height="Auto" MinHeight="24" />
+									<!--  https://github.com/xceedsoftware/wpftoolkit/issues/1203  -->
+									<RowDefinition Height="*" />
+								</Grid.RowDefinitions>
+								<Border
+									x:Name="Header"
+									Padding="2,0,2,0"
+									Background="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionInactiveBackground}}"
+									TextElement.Foreground="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionInactiveText}}">
+									<Grid UseLayoutRounding="True">
+										<Grid.ColumnDefinitions>
+											<ColumnDefinition Width="*" />
+											<ColumnDefinition Width="Auto" />
+											<ColumnDefinition Width="Auto" />
+											<ColumnDefinition Width="Auto" />
+										</Grid.ColumnDefinitions>
+
+										<Border Visibility="{Binding Path=Model.IsSinglePane, RelativeSource={RelativeSource TemplatedParent}, Converter={avalonDockConverters:BoolToVisibilityConverter}}">
+											<avalonDockControls:DropDownControlArea
+												DropDownContextMenu="{Binding Model.Root.Manager.AnchorableContextMenu, RelativeSource={RelativeSource TemplatedParent}}"
+												DropDownContextMenuDataContext="{Binding Path=SingleContentLayoutItem, RelativeSource={RelativeSource TemplatedParent}}"
+												Style="{DynamicResource DropDownControlArea}">
+												<ContentPresenter
+													Content="{Binding Model.SinglePane.SelectedContent, RelativeSource={RelativeSource TemplatedParent}}"
+													ContentTemplate="{Binding Model.Root.Manager.AnchorableTitleTemplate, RelativeSource={RelativeSource TemplatedParent}}"
+													ContentTemplateSelector="{Binding Model.Root.Manager.AnchorableTitleTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}" />
+											</avalonDockControls:DropDownControlArea>
+										</Border>
+
+										<avalonDockControls:DropDownButton
+											x:Name="SinglePaneContextMenu"
+											Grid.Column="1"
+											Margin="2,0"
+											HorizontalAlignment="Center"
+											VerticalAlignment="Center"
+											HorizontalContentAlignment="Center"
+											VerticalContentAlignment="Center"
+											shell:WindowChrome.IsHitTestVisibleInChrome="True"
+											DropDownContextMenu="{Binding Model.Root.Manager.AnchorableContextMenu, RelativeSource={RelativeSource TemplatedParent}}"
+											DropDownContextMenuDataContext="{Binding Path=SingleContentLayoutItem, RelativeSource={RelativeSource TemplatedParent}}"
+											Focusable="False"
+											Style="{StaticResource PixiEditorDockThemeToolButtonStyle}"
+											ToolTip="{x:Static avalonDockProperties:Resources.Anchorable_CxMenu_Hint}"
+											Visibility="{Binding Path=Model.IsSinglePane, RelativeSource={RelativeSource TemplatedParent}, Converter={avalonDockConverters:BoolToVisibilityConverter}}">
+											<Path
+												x:Name="PART_ImgPinMenu"
+												Width="11"
+												Height="11"
+												Data="{DynamicResource PinMenu}"
+												Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveGlyph}}"
+												Stretch="Uniform" />
+										</avalonDockControls:DropDownButton>
+
+										<Button
+											x:Name="PART_PinMaximize"
+											Grid.Column="2"
+											Margin="2,0"
+											HorizontalAlignment="Center"
+											VerticalAlignment="Center"
+											HorizontalContentAlignment="Center"
+											VerticalContentAlignment="Center"
+											shell:WindowChrome.IsHitTestVisibleInChrome="True"
+											Command="{x:Static shell:SystemCommands.MaximizeWindowCommand}"
+											CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
+											Focusable="False"
+											Style="{StaticResource PixiEditorDockThemeButtonStyle}"
+											ToolTip="{x:Static avalonDockProperties:Resources.Window_Maximize}"
+											Visibility="{Binding IsMaximized, RelativeSource={RelativeSource TemplatedParent}, Converter={avalonDockConverters:InverseBoolToVisibilityConverter}}">
+											<Path
+												x:Name="PART_ImgPinMaximize"
+												Width="11"
+												Height="11"
+												VerticalAlignment="Center"
+												Data="{DynamicResource PinMaximize}"
+												Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveGlyph}}"
+												Stretch="Uniform" />
+										</Button>
+
+										<Button
+											x:Name="PART_PinRestore"
+											Grid.Column="2"
+											Margin="2,0"
+											HorizontalAlignment="Center"
+											VerticalAlignment="Center"
+											shell:WindowChrome.IsHitTestVisibleInChrome="True"
+											Command="{x:Static shell:SystemCommands.RestoreWindowCommand}"
+											CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
+											Focusable="False"
+											Style="{StaticResource PixiEditorDockThemeButtonStyle}"
+											ToolTip="{x:Static avalonDockProperties:Resources.Window_Restore}"
+											Visibility="{Binding IsMaximized, RelativeSource={RelativeSource TemplatedParent}, Converter={avalonDockConverters:BoolToVisibilityConverter}}">
+											<Path
+												x:Name="PART_ImgPinRestore"
+												Width="11"
+												Height="11"
+												VerticalAlignment="Center"
+												Data="{DynamicResource PinRestore}"
+												Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveGlyph}}"
+												Stretch="Uniform" />
+										</Button>
+
+										<Button
+											x:Name="PART_PinClose"
+											Grid.Column="3"
+											Margin="2,0"
+											HorizontalAlignment="Center"
+											VerticalAlignment="Center"
+											shell:WindowChrome.IsHitTestVisibleInChrome="True"
+											Command="{Binding HideWindowCommand, RelativeSource={RelativeSource TemplatedParent}}"
+											Focusable="False"
+											Style="{StaticResource PixiEditorDockThemeButtonStyle}"
+											ToolTip="{x:Static avalonDockProperties:Resources.Anchorable_BtnClose_Hint}"
+											Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={avalonDockConverters:BoolToVisibilityConverter}}">
+											<Path
+												x:Name="PART_ImgPinClose"
+												Width="11"
+												Height="11"
+												VerticalAlignment="Center"
+												Data="{DynamicResource PinClose}"
+												Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveGlyph}}"
+												Stretch="Uniform" />
+										</Button>
+									</Grid>
+								</Border>
+								<ContentPresenter Grid.Row="1" Content="{TemplateBinding Content}" />
+							</Grid>
+						</Border>
+					</Grid>
+					<ControlTemplate.Triggers>
+						<Trigger Property="WindowState" Value="Maximized">
+							<Setter TargetName="WindowBorder" Property="Padding" Value="3" />
+						</Trigger>
+						<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.SinglePane.SelectedContent.IsActive}" Value="True">
+							<Setter TargetName="Header" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionActiveBackground}}" />
+							<Setter TargetName="Header" Property="TextElement.Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.ToolWindowCaptionActiveText}}" />
+						</DataTrigger>
+						<DataTrigger Binding="{Binding Model.SinglePane.SelectedContent.CanClose, RelativeSource={RelativeSource Mode=Self}}" Value="True">
+							<Setter TargetName="PART_PinClose" Property="Command" Value="{Binding CloseWindowCommand, RelativeSource={RelativeSource TemplatedParent}}" />
+							<Setter TargetName="PART_PinClose" Property="ToolTip" Value="{x:Static avalonDockProperties:Resources.Document_Close}" />
+						</DataTrigger>
+						<!--  Document Well : Tab : Button / Selected, inactive, hovered  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseOver, ElementName=SinglePaneContextMenu}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="SinglePaneContextMenu" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBackground}}" />
+							<Setter TargetName="SinglePaneContextMenu" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinMenu" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseOver, ElementName=PART_PinMaximize}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinMaximize" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBackground}}" />
+							<Setter TargetName="PART_PinMaximize" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinMaximize" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseOver, ElementName=PART_PinRestore}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinRestore" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBackground}}" />
+							<Setter TargetName="PART_PinRestore" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinRestore" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseOver, ElementName=PART_PinClose}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinClose" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBackground}}" />
+							<Setter TargetName="PART_PinClose" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Document Well : Tab : Button / Selected, inactive, pressed  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=SinglePaneContextMenu}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="SinglePaneContextMenu" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBackground}}" />
+							<Setter TargetName="SinglePaneContextMenu" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinMenu" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsChecked, ElementName=SinglePaneContextMenu}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="SinglePaneContextMenu" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBackground}}" />
+							<Setter TargetName="SinglePaneContextMenu" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinMenu" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=PART_PinMaximize}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinMaximize" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBackground}}" />
+							<Setter TargetName="PART_PinMaximize" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinMaximize" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=PART_PinRestore}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinRestore" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBackground}}" />
+							<Setter TargetName="PART_PinRestore" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinRestore" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=PART_PinClose}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinClose" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBackground}}" />
+							<Setter TargetName="PART_PinClose" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Document Well : Tab : Button / Selected, active  -->
+						<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.SinglePane.SelectedContent.IsActive}" Value="true">
+							<Setter TargetName="PART_ImgPinMenu" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveGlyph}}" />
+							<Setter TargetName="PART_ImgPinMaximize" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveGlyph}}" />
+							<Setter TargetName="PART_ImgPinRestore" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveGlyph}}" />
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveGlyph}}" />
+						</DataTrigger>
+
+						<!--  Document Well : Tab : Button / Selected, active, hovered  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.SinglePane.SelectedContent.IsActive}" Value="true" />
+								<Condition Binding="{Binding IsMouseOver, ElementName=SinglePaneContextMenu}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="SinglePaneContextMenu" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBackground}}" />
+							<Setter TargetName="SinglePaneContextMenu" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinMenu" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.SinglePane.SelectedContent.IsActive}" Value="true" />
+								<Condition Binding="{Binding IsMouseOver, ElementName=PART_PinMaximize}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinMaximize" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBackground}}" />
+							<Setter TargetName="PART_PinMaximize" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinMaximize" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.SinglePane.SelectedContent.IsActive}" Value="true" />
+								<Condition Binding="{Binding IsMouseOver, ElementName=PART_PinRestore}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinRestore" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBackground}}" />
+							<Setter TargetName="PART_PinRestore" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinRestore" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.SinglePane.SelectedContent.IsActive}" Value="true" />
+								<Condition Binding="{Binding IsMouseOver, ElementName=PART_PinClose}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinClose" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBackground}}" />
+							<Setter TargetName="PART_PinClose" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBorder}}" />
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredGlyph}}" />
+						</MultiDataTrigger>
+
+						<!--  Document Well : Tab : Button / Selected, active, pressed  -->
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.SinglePane.SelectedContent.IsActive}" Value="true" />
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=SinglePaneContextMenu}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="SinglePaneContextMenu" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBackground}}" />
+							<Setter TargetName="SinglePaneContextMenu" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinMenu" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.SinglePane.SelectedContent.IsActive}" Value="true" />
+								<Condition Binding="{Binding IsChecked, ElementName=SinglePaneContextMenu}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="SinglePaneContextMenu" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBackground}}" />
+							<Setter TargetName="SinglePaneContextMenu" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinMenu" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.SinglePane.SelectedContent.IsActive}" Value="true" />
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=PART_PinMaximize}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinMaximize" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBackground}}" />
+							<Setter TargetName="PART_PinMaximize" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinMaximize" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.SinglePane.SelectedContent.IsActive}" Value="true" />
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=PART_PinRestore}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinRestore" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBackground}}" />
+							<Setter TargetName="PART_PinRestore" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinRestore" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedGlyph}}" />
+						</MultiDataTrigger>
+						<MultiDataTrigger>
+							<MultiDataTrigger.Conditions>
+								<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.SinglePane.SelectedContent.IsActive}" Value="true" />
+								<Condition Binding="{Binding IsMouseCaptured, ElementName=PART_PinClose}" Value="True" />
+							</MultiDataTrigger.Conditions>
+							<Setter TargetName="PART_PinClose" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBackground}}" />
+							<Setter TargetName="PART_PinClose" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBorder}}" />
+							<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedGlyph}}" />
+						</MultiDataTrigger>
+					</ControlTemplate.Triggers>
+				</ControlTemplate>
+			</Setter.Value>
+		</Setter>
+	</Style>
+
+	<Style x:Key="{x:Type avalonDockControls:LayoutAutoHideWindowControl}" TargetType="{x:Type avalonDockControls:LayoutAutoHideWindowControl}">
+		<Setter Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.TabBackground}}" />
+		<Setter Property="AnchorableStyle">
+			<Setter.Value>
+				<Style TargetType="avalonDockControls:LayoutAnchorableControl">
+					<Setter Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.PanelBorderBrush}}" />
+					<Setter Property="BorderThickness" Value="1" />
+				</Style>
+			</Setter.Value>
+		</Setter>
+	</Style>
+
+
+	<Style x:Key="PixiEditorDockThemeNavigatorWindowListBoxItemFocusVisual">
+		<Setter Property="Control.Template">
+			<Setter.Value>
+				<ControlTemplate>
+					<Rectangle
+						RadiusX="2"
+						RadiusY="2"
+						Stroke="{DynamicResource {x:Static reskeys:ResourceKeys.PanelBorderBrush}}"
+						StrokeThickness="1" />
+				</ControlTemplate>
+			</Setter.Value>
+		</Setter>
+	</Style>
+
+	<Style x:Key="PixiEditorDockThemeNavigatorWindowListBoxItemStyle" TargetType="ListBoxItem">
+		<Setter Property="FocusVisualStyle" Value="{StaticResource PixiEditorDockThemeNavigatorWindowListBoxItemFocusVisual}" />
+		<Setter Property="Background" Value="Transparent" />
+		<Setter Property="BorderBrush" Value="Transparent" />
+		<Setter Property="TextElement.Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.NavigatorWindowForeground}}" />
+		<Setter Property="BorderThickness" Value="1" />
+		<Setter Property="Padding" Value="5,0,5,0" />
+		<Setter Property="VerticalContentAlignment" Value="Center" />
+		<Setter Property="Cursor" Value="Hand" />
+		<Setter Property="Template">
+			<Setter.Value>
+				<ControlTemplate TargetType="ListBoxItem">
+					<Border
+						Background="{TemplateBinding Background}"
+						BorderBrush="{TemplateBinding BorderBrush}"
+						BorderThickness="{TemplateBinding BorderThickness}"
+						SnapsToDevicePixels="true">
+						<Border x:Name="InnerBorder" BorderThickness="1">
+							<Grid>
+								<Grid.RowDefinitions>
+									<RowDefinition MaxHeight="11" />
+									<RowDefinition />
+								</Grid.RowDefinitions>
+								<Rectangle
+									x:Name="UpperHighlight"
+									Fill="#75FFFFFF"
+									Visibility="Collapsed" />
+								<ContentPresenter
+									Grid.RowSpan="2"
+									VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+									SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+							</Grid>
+						</Border>
+					</Border>
+					<ControlTemplate.Triggers>
+						<!--<Trigger Property="IsMouseOver" Value="true">
+                            <Setter Property="Background" Value="{StaticResource PixiEditorDockThemeNavigatorWindowListBoxItemSelectedFill}" />
+                            <Setter Property="BorderBrush" Value="#FF98DDFB" />
+                            <Setter TargetName="InnerBorder" Property="BorderBrush" Value="#80FFFFFF" />
+                            <Setter TargetName="UpperHighlight" Property="Visibility" Value="Visible" />
+                            <Setter TargetName="UpperHighlight" Property="Fill" Value="#40FFFFFF" />
+                        </Trigger>-->
+						<Trigger Property="IsSelected" Value="true">
+							<Setter Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.NavigatorWindowSelectedBackground}}" />
+							<Setter Property="TextElement.Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.NavigatorWindowSelectedText}}" />
+							<!--<Setter Property="BorderBrush" Value="#FF98DDFB" />-->
+							<!--<Setter TargetName="InnerBorder" Property="BorderBrush" Value="#80FFFFFF" />-->
+							<!--<Setter TargetName="UpperHighlight" Property="Visibility" Value="Visible" />
+                            <Setter TargetName="UpperHighlight" Property="Fill" Value="#40FFFFFF" />-->
+						</Trigger>
+						<!--
+                            <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                            <Condition Property="IsSelected" Value="true"/>
+                            <Condition Property="IsMouseOver" Value="true"/>
+                            </MultiTrigger.Conditions>
+                            <Setter Property="Background" Value="{StaticResource AvalonDock_ThemeMetro_NavigatorWindowListBoxItemSelectedHoverFill}"/>
+                            <Setter Property="BorderBrush" Value="#FF98DDFB"/>
+                            </MultiTrigger>
+						-->
+						<Trigger Property="IsEnabled" Value="false">
+							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
+						</Trigger>
+					</ControlTemplate.Triggers>
+				</ControlTemplate>
+			</Setter.Value>
+		</Setter>
+	</Style>
+
+	<Style x:Key="{x:Type avalonDockControls:NavigatorWindow}" TargetType="{x:Type avalonDockControls:NavigatorWindow}">
+		<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
+		<Setter Property="SizeToContent" Value="WidthAndHeight" />
+		<Setter Property="ResizeMode" Value="NoResize" />
+		<!--<Setter Property="shell:WindowChrome.WindowChrome">
+            <Setter.Value>
+                <shell:WindowChrome CaptionHeight="16"
+                                    GlassFrameThickness="4"
+                                    ResizeBorderThickness="10" />
+            </Setter.Value>
+        </Setter>-->
+		<Setter Property="Template">
+			<Setter.Value>
+				<ControlTemplate TargetType="{x:Type avalonDockControls:NavigatorWindow}">
+					<Grid>
+						<Border
+							x:Name="WindowBorder"
+							Background="{DynamicResource {x:Static reskeys:ResourceKeys.NavigatorWindowBackground}}"
+							BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.PanelBorderBrush}}"
+							BorderThickness="1">
+							<Grid>
+								<Grid.RowDefinitions>
+									<RowDefinition Height="54" />
+									<RowDefinition Height="*" />
+									<RowDefinition Height="Auto" />
+								</Grid.RowDefinitions>
+
+								<Grid Margin="5">
+									<Grid.RowDefinitions>
+										<RowDefinition />
+										<RowDefinition />
+									</Grid.RowDefinitions>
+									<Grid>
+										<Grid.ColumnDefinitions>
+											<ColumnDefinition Width="Auto" />
+											<ColumnDefinition />
+										</Grid.ColumnDefinitions>
+										<Image
+											Source="{Binding SelectedDocument.LayoutElement.IconSource, RelativeSource={RelativeSource TemplatedParent}, Converter={avalonDockConverters:NullToDoNothingConverter}}"
+											Stretch="None"
+											Visibility="{Binding SelectedDocument.LayoutElement.IconSource, RelativeSource={RelativeSource TemplatedParent}, Converter={avalonDockConverters:BoolToVisibilityConverter}}" />
+										<TextBlock
+											x:Name="selectedElementTitle"
+											Grid.Column="1"
+											Margin="4,0,0,0"
+											VerticalAlignment="Center"
+											FontWeight="Bold"
+											Foreground="{DynamicResource {x:Static reskeys:ResourceKeys.NavigatorWindowForeground}}"
+											Text="{Binding SelectedDocument.LayoutElement.Title, RelativeSource={RelativeSource TemplatedParent}}"
+											TextTrimming="CharacterEllipsis" />
+									</Grid>
+									<TextBlock
+										x:Name="selectedElementDescription"
+										VerticalAlignment="Center"
+										Text="{Binding SelectedDocument.LayoutElement.Description}"
+										TextTrimming="CharacterEllipsis" />
+								</Grid>
+
+								<Border
+									Grid.Row="1"
+									MinHeight="200"
+									Background="{DynamicResource {x:Static reskeys:ResourceKeys.NavigatorWindowBackground}}"
+									BorderBrush="Transparent"
+									BorderThickness="0,1,0,0">
+									<Grid Margin="5">
+										<Grid.ColumnDefinitions>
+											<ColumnDefinition Width="Auto" />
+											<ColumnDefinition />
+										</Grid.ColumnDefinitions>
+										<Grid Margin="5">
+											<Grid.RowDefinitions>
+												<RowDefinition Height="Auto" />
+												<RowDefinition />
+											</Grid.RowDefinitions>
+											<TextBlock
+												Margin="0,3,0,4"
+												FontWeight="Bold"
+												Foreground="{DynamicResource {x:Static reskeys:ResourceKeys.NavigatorWindowForeground}}"
+												Text="{x:Static avalonDockProperties:Resources.Active_ToolWindows}" />
+											<ListBox
+												x:Name="PART_AnchorableListBox"
+												Grid.Row="1"
+												MaxHeight="400"
+												Background="Transparent"
+												ItemContainerStyle="{StaticResource PixiEditorDockThemeNavigatorWindowListBoxItemStyle}"
+												ItemsSource="{Binding Anchorables}"
+												SelectedItem="{Binding SelectedAnchorable, Mode=TwoWay}">
+												<ListBox.ItemTemplate>
+													<DataTemplate>
+														<Grid>
+															<Grid.ColumnDefinitions>
+																<ColumnDefinition Width="16" />
+																<ColumnDefinition Width="150" />
+															</Grid.ColumnDefinitions>
+															<Image Source="{Binding LayoutElement.IconSource, Converter={avalonDockConverters:NullToDoNothingConverter}}" Stretch="None" />
+															<TextBlock
+																Grid.Column="1"
+																Margin="4,0,0,0"
+																Text="{Binding LayoutElement.Title}"
+																TextTrimming="CharacterEllipsis" />
+														</Grid>
+													</DataTemplate>
+												</ListBox.ItemTemplate>
+											</ListBox>
+										</Grid>
+										<Grid Grid.Column="1" Margin="5">
+											<Grid.RowDefinitions>
+												<RowDefinition Height="Auto" />
+												<RowDefinition />
+											</Grid.RowDefinitions>
+											<TextBlock
+												Margin="0,3,0,4"
+												FontWeight="Bold"
+												Foreground="{DynamicResource {x:Static reskeys:ResourceKeys.NavigatorWindowForeground}}"
+												Text="{x:Static avalonDockProperties:Resources.Active_Files}" />
+
+											<ListBox
+												x:Name="PART_DocumentListBox"
+												Grid.Row="1"
+												MaxHeight="400"
+												Background="Transparent"
+												ItemContainerStyle="{StaticResource PixiEditorDockThemeNavigatorWindowListBoxItemStyle}"
+												ItemsSource="{Binding Documents}"
+												SelectedItem="{Binding SelectedDocument, Mode=TwoWay}">
+												<ListBox.ItemTemplate>
+													<DataTemplate>
+														<Grid>
+															<Grid.ColumnDefinitions>
+																<ColumnDefinition Width="16" />
+																<ColumnDefinition Width="150" />
+															</Grid.ColumnDefinitions>
+															<Image Source="{Binding LayoutElement.IconSource, Converter={avalonDockConverters:NullToDoNothingConverter}}" Stretch="None" />
+															<TextBlock
+																Grid.Column="1"
+																Margin="4,0,0,0"
+																Text="{Binding LayoutElement.Title}"
+																TextTrimming="CharacterEllipsis" />
+														</Grid>
+													</DataTemplate>
+												</ListBox.ItemTemplate>
+												<ListBox.ItemsPanel>
+													<ItemsPanelTemplate>
+														<WrapPanel Orientation="Vertical" />
+													</ItemsPanelTemplate>
+												</ListBox.ItemsPanel>
+											</ListBox>
+										</Grid>
+									</Grid>
+								</Border>
+
+								<Grid Grid.Row="2" Margin="5">
+									<TextBlock
+										VerticalAlignment="Center"
+										Foreground="{DynamicResource {x:Static reskeys:ResourceKeys.NavigatorWindowForeground}}"
+										Text="{Binding SelectedDocument.LayoutElement.ToolTip, RelativeSource={RelativeSource TemplatedParent}}" />
+								</Grid>
+							</Grid>
+						</Border>
+					</Grid>
+					<ControlTemplate.Triggers>
+						<Trigger Property="SelectedDocument" Value="{x:Null}">
+							<Setter TargetName="selectedElementTitle" Property="Text" Value="{Binding SelectedAnchorable.LayoutElement.Title}" />
+							<Setter TargetName="selectedElementDescription" Property="Text" Value="{x:Null}" />
+						</Trigger>
+					</ControlTemplate.Triggers>
+				</ControlTemplate>
+			</Setter.Value>
+		</Setter>
+	</Style>
+
+</ResourceDictionary>

+ 13 - 0
PixiEditor/Styles/AvalonDock/Themes/Icons/IconGeometry.xaml

@@ -0,0 +1,13 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+	<PathGeometry x:Key="PinAutoHide" Figures="M 128,17.475L 130.842,17.475L 130.842,2.91001L 130.842,0.608195L 130.842,0.000223796L 139.593,0.000223796L 145.003,0.000223796L 145.424,0.000223796L 145.424,17.475L 148.413,17.475L 148.413,20.3848L 139.684,20.3848L 139.684,32.0003L 136.752,32.0003L 136.752,20.3848L 128,20.3848L 128,17.475 Z M 133.774,2.91007L 133.774,17.475L 139.593,17.475L 139.593,2.91007L 133.774,2.91007 Z" />
+	<PathGeometry x:Key="HTabGroup" Figures="M 2.53856,7.38456L 2.53856,12.3846L 31.9231,12.3846L 31.9231,7.38456L 2.53856,7.38456 Z M 0,0.000162761L 34.3846,0.000162761L 34.3846,14.7694L 0,14.7694L 0,0.000162761 Z M 2.53861,24.6155L 2.53861,29.6155L 31.9232,29.6155L 31.9232,24.6155L 2.53861,24.6155 Z M 5.00801e-005,17.2309L 34.3846,17.2309L 34.3846,32.0001L 5.00801e-005,32.0001L 5.00801e-005,17.2309 Z " />
+	<PathGeometry x:Key="VTabGroup" Figures="M 64,0.000223796L 101.319,0.000223796L 101.319,32.0002L 64,32.0002L 64,0.000223796 Z M 66.6804,8.03752L 66.6804,29.3154L 79.896,29.3154L 79.896,8.03752L 66.6804,8.03752 Z M 85.4232,8.03746L 85.4232,29.3154L 98.6388,29.3154L 98.6388,8.03746L 85.4232,8.03746 Z " />
+	<PathGeometry x:Key="DockPaneLargeEmpty" Figures="M 192,19.4161L 192,12.5843L 202.892,12.5843L 204.584,10.8924L 204.584,0.000223796L 211.416,0.000223796L 211.416,10.8924L 213.108,12.5843L 224,12.5843L 224,19.4161L 213.108,19.4161L 211.416,21.108L 211.416,32.0002L 204.584,32.0002L 204.584,21.108L 202.892,19.4161L 192,19.4161 Z " />
+	<PathGeometry x:Key="DockPaneEmpty" Figures="M 266.388,0.000223796L 277.612,0.000223796L 277.612,7.60856L 280.392,10.3883L 288,10.3883L 288,21.6122L 280.392,21.6122L 277.612,24.3919L 277.612,32.0002L 266.388,32.0002L 266.388,24.3919L 263.608,21.6122L 256,21.6122L 256,10.3883L 263.608,10.3883L 266.388,7.60856L 266.388,0.000223796 Z " />
+	<PathGeometry x:Key="PinMenu" Figures="M 352.041,32.0005L 320,0.000162761L 384,0.000162761L 352.041,32.0005 Z " />
+	<PathGeometry x:Key="PinClose" Figures="M 0,2.0345e-005L 7.62109,2.0345e-005L 19.2627,12.0551L 30.9043,2.0345e-005L 38.5241,2.0345e-005L 23.0726,16.0003L 38.5234,32L 30.9023,32L 19.2621,19.9462L 7.62177,32L 0.00195313,32L 15.4521,16.001L 0,2.0345e-005 Z" />
+	<PathGeometry x:Key="PinRestore" Figures="M 480,6.27958L 486.48,6.27958L 486.48,0.000101726L 512.201,0.000101726L 512.201,25.7207L 505.721,25.7207L 505.721,32.0001L 480,32.0001L 480,6.27958 Z M 505.721,6.27964L 505.721,22.5896L 508.852,22.5896L 508.852,3.29911L 489.561,3.29911L 489.561,6.27964L 505.721,6.27964 Z M 483.081,9.57847L 483.081,28.8689L 502.371,28.8689L 502.371,9.57847L 483.081,9.57847 Z " />
+	<PathGeometry x:Key="PinMaximize" Figures="M 544,4.06904e-005L 576,4.06904e-005L 576,32L 544,32L 544,4.06904e-005 Z M 547.2,3.20011L 547.2,28.8001L 572.8,28.8001L 572.8,3.20011L 547.2,3.20011 Z " />
+	<PathGeometry x:Key="PinDocMenu" Figures="M 608,0.000223796L 640,0.000223796L 640,7.70652L 608,7.70652L 608,0.000223796 Z M 624.021,32.0002L 608,16.0001L 640,16.0001L 624.021,32.0002 Z " />
+	<PathGeometry x:Key="Locked" Figures="M 1.77411,12.4183L 23.0627,12.4183C 24.0423,12.4183 24.8366,13.2126 24.8366,14.1925L 24.8366,30.1588C 24.8366,31.1386 24.0423,31.9329 23.0627,31.9329L 1.77411,31.9329C 0.794312,31.9329 0,31.1386 0,30.1588L 0,14.1925C 0,13.2126 0.794312,12.4183 1.77411,12.4183 Z M 14.5149,22.095C 15.0955,21.6111 15.4826,20.9337 15.4826,20.1595C 15.4826,18.805 14.4182,17.7404 13.0635,17.7404C 11.7087,17.7404 10.6442,18.8048 10.6442,20.1595C 10.6442,20.9337 11.0313,21.6111 11.6119,22.095L 11.6119,24.0302C 11.6119,24.8044 12.2893,25.4818 13.0633,25.4818C 13.8375,25.4818 14.5149,24.8044 14.5149,24.0302L 14.5149,22.095 Z M 20.9659,12.4183L 18.063,12.4183L 18.063,8.70894C 18.063,5.51565 15.4504,2.90304 12.257,2.90304C 9.06372,2.90304 6.45111,5.51565 6.45111,8.70894L 6.45111,12.4183L 3.54816,12.4183L 3.54816,8.70894C 3.54816,3.87069 7.41882,2.03401e-005 12.257,2.03401e-005C 17.0955,2.03401e-005 20.9659,3.87069 20.9659,8.70894L 20.9659,12.4183 Z " />
+</ResourceDictionary>

+ 132 - 0
PixiEditor/Styles/AvalonDock/Themes/Menu/DarkBrushes.xaml

@@ -0,0 +1,132 @@
+<ResourceDictionary
+	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+	xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
+	xmlns:reskeys="clr-namespace:PixiEditor.Styles.AvalonDock.Themes">
+	<!--  Menu  -->
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=MenuSeparatorBorderBrushKey}"
+		PresentationOptions:Freeze="True"
+		Color="#333337" />
+
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=SubmenuItemBackgroundKey}"
+		PresentationOptions:Freeze="True"
+		Color="#1B1B1C" />
+
+	<!--  Highlighing Top Menu Entry on Mouse over  -->
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=MenuItemHighlightedBackgroundKey}"
+		PresentationOptions:Freeze="True"
+		Color="#3E3E40" />
+
+	<!--  Highlighting all other than Top Menu entry on mouse over  -->
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=SubmenuItemBackgroundHighlightedKey}"
+		PresentationOptions:Freeze="True"
+		Color="#333334" />
+
+	<!--  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  -->
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=FocusScrollButtonBrushKey}"
+		PresentationOptions:Freeze="True"
+		Color="#FF042271" />
+
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=ScrollButtonBrushKey}"
+		PresentationOptions:Freeze="True"
+		Color="#FFFFFFFF" />
+
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=CheckMarkBackgroundBrushKey}"
+		PresentationOptions:Freeze="True"
+		Color="Transparent" />
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=CheckMarkBorderBrushKey}"
+		PresentationOptions:Freeze="True"
+		Color="#90CDD3E6" />
+
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=CheckMarkForegroundBrushKey}"
+		PresentationOptions:Freeze="True"
+		Color="White" />
+
+	<!--  SolidColorBrush x:Key="DisabledSubMenuItemForegroundBrush" Color="#FF9A9A9A" /  -->
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=DisabledSubMenuItemBackgroundBrushKey}"
+		PresentationOptions:Freeze="True"
+		Color="#FFEEE9E9" />
+
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=DisabledSubMenuItemBorderBrushKey}"
+		PresentationOptions:Freeze="True"
+		Color="#DBD6D6" />
+
+	<!--  SolidColorBrush x:Key="MenuBarBackgroundBorderBrush" Color="#F0000000"/  -->
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=MenuBorderBrushKey}"
+		PresentationOptions:Freeze="True"
+		Color="#333337" />
+
+	<LinearGradientBrush x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys}, ResourceId=MenuBackgroundKey}" PresentationOptions:Freeze="True" StartPoint="0,0" EndPoint="0,1">
+		<GradientStop Offset="1" Color="#1B1B1C" />
+	</LinearGradientBrush>
+
+	<!--  Styles the background of the top level item in a menu (Files, Edit, ...)  -->
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=TopLevelHeaderMenuBackgroundKey}"
+		PresentationOptions:Freeze="True"
+		Color="#333337" />
+	<!--  Control Keys XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  -->
+
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=TextBrushKey}"
+		PresentationOptions:Freeze="True"
+		Color="White" />
+
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=ItemBackgroundSelectedKey}"
+		PresentationOptions:Freeze="True"
+		Color="{DynamicResource {x:Static reskeys:ResourceKeys.ControlAccentColorKey}}" />
+
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=ItemTextDisabledKey}"
+		PresentationOptions:Freeze="True"
+		Color="#717171" />
+
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=NormalBackgroundBrushKey}"
+		PresentationOptions:Freeze="True"
+		Color="#FF2D2D30" />
+
+	<SolidColorBrush
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=ItemBackgroundHoverKey}"
+		PresentationOptions:Freeze="True"
+		Color="#3e3e42" />
+
+	<!--  Define Shadow Effect for each menu item  -->
+	<DropShadowEffect
+		x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type reskeys:ResourceKeys},
+									 ResourceId=DropShadowEffectKey}"
+		ShadowDepth="2"
+		Color="Black" />
+
+</ResourceDictionary>

+ 226 - 0
PixiEditor/Styles/AvalonDock/Themes/Menu/MenuItem.xaml

@@ -0,0 +1,226 @@
+<ResourceDictionary
+	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+	xmlns:reskeys="clr-namespace:PixiEditor.Styles.AvalonDock.Themes.Menu">
+
+	<!--  Source https://github.com/Dirkster99/MLib/blob/master/source/Components/MLib/Controls/Menu/ContextMenu.xaml  -->
+	<ControlTemplate x:Key="MLibMenuItem" TargetType="{x:Type MenuItem}">
+		<ControlTemplate.Resources>
+			<Geometry x:Key="Checkmark">M 0,5.1 L 1.7,5.2 L 3.4,7.1 L 8,0.4 L 9.2,0 L 3.3,10.8 Z</Geometry>
+		</ControlTemplate.Resources>
+		<!--  Border 1 Item with Submenu underneath  -->
+		<Border
+			x:Name="Border"
+			Background="Transparent"
+			BorderBrush="Transparent"
+			BorderThickness="{TemplateBinding BorderThickness}"
+			SnapsToDevicePixels="True">
+			<Grid x:Name="Grid">
+				<Grid.ColumnDefinitions>
+					<ColumnDefinition
+						x:Name="Col0"
+						Width="Auto"
+						MinWidth="17"
+						SharedSizeGroup="MenuItemIconColumnGroup" />
+					<ColumnDefinition Width="Auto" SharedSizeGroup="MenuTextColumnGroup" />
+					<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup" />
+					<ColumnDefinition x:Name="Col3" Width="*" />
+				</Grid.ColumnDefinitions>
+
+				<ContentPresenter
+					x:Name="Icon"
+					Grid.Column="0"
+					Margin="2,0,2,0"
+					VerticalAlignment="Center"
+					ContentSource="Icon" />
+
+				<Border
+					x:Name="GlyphPanel"
+					Width="18"
+					Height="18"
+					Margin="2,0,2,0"
+					HorizontalAlignment="Center"
+					Background="{DynamicResource {x:Static reskeys:MenuKeys.CheckMarkBackgroundBrushKey}}"
+					BorderBrush="{DynamicResource {x:Static reskeys:MenuKeys.CheckMarkBorderBrushKey}}"
+					BorderThickness="2"
+					CornerRadius="0"
+					Visibility="Collapsed">
+
+					<Path
+						x:Name="Glyph"
+						Width="9"
+						Height="11"
+						HorizontalAlignment="Center"
+						Data="{StaticResource Checkmark}"
+						Fill="{DynamicResource {x:Static reskeys:MenuKeys.CheckMarkForegroundBrushKey}}"
+						FlowDirection="LeftToRight" />
+				</Border>
+
+				<ContentPresenter
+					x:Name="HeaderHost"
+					Grid.Column="1"
+					Margin="{TemplateBinding Padding}"
+					VerticalAlignment="Center"
+					ContentSource="Header"
+					RecognizesAccessKey="True" />
+
+				<ContentPresenter
+					x:Name="IGTHost"
+					Grid.Column="2"
+					Margin="8,1,8,1"
+					VerticalAlignment="Center"
+					ContentSource="InputGestureText" />
+
+				<Grid
+					x:Name="ArrowPanel"
+					Grid.Column="3"
+					Margin="4,0,6,0"
+					HorizontalAlignment="Stretch"
+					VerticalAlignment="Center">
+					<Path
+						x:Name="ArrowPanelPath"
+						HorizontalAlignment="Right"
+						VerticalAlignment="Center"
+						Data="M0,0 L0,8 L4,4 z"
+						Fill="{TemplateBinding Foreground}" />
+				</Grid>
+				<Popup
+					x:Name="SubMenuPopup"
+					AllowsTransparency="True"
+					Focusable="false"
+					HorizontalOffset="-1"
+					IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
+					Placement="Right"
+					PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}">
+					<Grid Margin="0,0,5,5">
+						<!--  Border 2  -->
+						<Border
+							x:Name="SubMenuBorder"
+							Background="{DynamicResource {x:Static reskeys:MenuKeys.SubmenuItemBackgroundKey}}"
+							BorderBrush="{DynamicResource {x:Static reskeys:MenuKeys.MenuSeparatorBorderBrushKey}}"
+							BorderThickness="1"
+							Effect="{DynamicResource {x:Static reskeys:MenuKeys.DropShadowEffectKey}}"
+							SnapsToDevicePixels="True">
+							<Grid
+								x:Name="SubMenu"
+								Margin="2"
+								Grid.IsSharedSizeScope="True">
+								<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
+							</Grid>
+						</Border>
+						<!--  Border 3  -->
+						<Border
+							x:Name="TransitionBorder"
+							Width="0"
+							Height="2"
+							Margin="1,0,0,0"
+							HorizontalAlignment="Left"
+							VerticalAlignment="Top"
+							Background="{DynamicResource {x:Static reskeys:MenuKeys.SubmenuItemBackgroundKey}}"
+							BorderBrush="{DynamicResource {x:Static reskeys:MenuKeys.SubmenuItemBackgroundKey}}"
+							BorderThickness="1"
+							SnapsToDevicePixels="False" />
+					</Grid>
+				</Popup>
+			</Grid>
+		</Border>
+		<ControlTemplate.Triggers>
+			<!--  A menu entry with check mark cannot have an icon  -->
+			<Trigger Property="IsChecked" Value="true">
+				<Setter TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
+				<Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
+			</Trigger>
+
+			<!--<Trigger Property="Role" Value="TopLevelHeader">
+                                    <Setter Property="Padding" Value="6,0,6,2"/>
+                                    <Setter TargetName="SubMenuPopup" Property="Placement" Value="Bottom"/>
+                                    <Setter TargetName="Col0" Property="MinWidth" Value="0"/>
+                                    <Setter TargetName="Col3" Property="Width" Value="Auto"/>
+                                    <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
+                                    <Setter TargetName="IGTHost" Property="Visibility" Value="Collapsed" />
+                                    <Setter TargetName="ArrowPanel" Property="Visibility" Value="Collapsed"/>
+                                    <Setter TargetName="SubMenuBorder" Property="BorderThickness" Value="1,1,1,1"/>
+                                    <Setter TargetName="SubMenu" Property="Margin" Value="2,3,2,2"/>
+                                    <Setter TargetName="TransitionBorder" Property="Width" Value="{Binding ActualWidth, ElementName=Grid}"/>
+                                </Trigger>
+                                <Trigger Property="Role" Value="TopLevelItem">
+                                    <Setter Property="Padding" Value="6,0,6,2"/>
+                                    <Setter TargetName="Col0" Property="MinWidth" Value="0"/>
+                                    <Setter TargetName="Col3" Property="Width" Value="Auto"/>
+                                    <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
+                                    <Setter TargetName="IGTHost" Property="Visibility" Value="Collapsed"/>
+                                    <Setter TargetName="ArrowPanel" Property="Visibility" Value="Collapsed"/>
+                                </Trigger>-->
+			<Trigger Property="Role" Value="SubmenuHeader">
+				<Setter Property="DockPanel.Dock" Value="Top" />
+				<Setter Property="Padding" Value="10,3,0,3" />
+				<Setter TargetName="Border" Property="MinHeight" Value="22" />
+				<Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static reskeys:MenuKeys.SubmenuItemBackgroundKey}}" />
+			</Trigger>
+			<Trigger Property="Role" Value="SubmenuItem">
+				<Setter Property="DockPanel.Dock" Value="Top" />
+				<Setter Property="Padding" Value="10,3,0,3" />
+				<Setter TargetName="Border" Property="MinHeight" Value="22" />
+				<Setter TargetName="ArrowPanel" Property="Visibility" Value="Collapsed" />
+				<Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static reskeys:MenuKeys.SubmenuItemBackgroundKey}}" />
+			</Trigger>
+			<Trigger Property="IsHighlighted" Value="True">
+				<!--  Border Applies to item with sub-menu attached to it  -->
+				<Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static reskeys:MenuKeys.ItemBackgroundHoverKey}}" />
+			</Trigger>
+			<!-- MultiTrigger>
+                <MultiTrigger.Conditions>
+                    <Condition Property="IsHighlighted" Value="true"/>
+                    <Condition Property="Role" Value="TopLevelHeader"/>
+                </MultiTrigger.Conditions>
+                <Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static reskeys:MenuKeys.MenuItemHighlightedBackgroundKey}}"/>
+            </>
+            <MultiTrigger>
+                <MultiTrigger.Conditions>
+                    <Condition Property="IsHighlighted" Value="true"/>
+                    <Condition Property="Role" Value="TopLevelItem"/>
+                </MultiTrigger.Conditions>
+                <Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static reskeys:MenuKeys.MenuItemHighlightedBackgroundKey}}"/>
+            </MultiTrigger>
+            <MultiTrigger>
+                <MultiTrigger.Conditions>
+                    <Condition Property="IsHighlighted" Value="true"/>
+                    <Condition Property="Role" Value="SubmenuHeader"/>
+                </MultiTrigger.Conditions>
+                <Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static reskeys:MenuKeys.SubmenuItemBackgroundHighlightedKey}}"/>
+                <Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static reskeys:MenuKeys.SubmenuItemBackgroundHighlightedKey}}"/>
+            </MultiTrigger>
+            <MultiTrigger>
+                <MultiTrigger.Conditions>
+                    <Condition Property="IsHighlighted" Value="true"/>
+                    <Condition Property="Role" Value="SubmenuItem"/>
+                </MultiTrigger.Conditions>
+                <Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static reskeys:MenuKeys.SubmenuItemBackgroundHighlightedKey}}"/>
+            </MultiTrigger-->
+			<MultiTrigger>
+				<MultiTrigger.Conditions>
+					<Condition Property="IsSubmenuOpen" Value="true" />
+					<Condition Property="Role" Value="TopLevelHeader" />
+				</MultiTrigger.Conditions>
+				<Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static reskeys:MenuKeys.SubmenuItemBackgroundKey}}" />
+				<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:MenuKeys.MenuSeparatorBorderBrushKey}}" />
+				<Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0" />
+			</MultiTrigger>
+			<Trigger Property="IsSubmenuOpen" Value="true">
+				<Setter TargetName="ArrowPanelPath" Property="Fill" Value="{DynamicResource {x:Static reskeys:MenuKeys.ItemBackgroundSelectedKey}}" />
+			</Trigger>
+			<Trigger Property="IsSuspendingPopupAnimation" Value="true">
+				<Setter TargetName="SubMenuPopup" Property="PopupAnimation" Value="None" />
+			</Trigger>
+			<Trigger Property="Icon" Value="{x:Null}">
+				<Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
+			</Trigger>
+			<Trigger Property="IsEnabled" Value="False">
+				<Setter Property="Foreground" Value="{DynamicResource {x:Static reskeys:MenuKeys.ItemTextDisabledKey}}" />
+				<Setter TargetName="GlyphPanel" Property="Background" Value="{DynamicResource {x:Static reskeys:MenuKeys.DisabledSubMenuItemBackgroundBrushKey}}" />
+				<Setter TargetName="GlyphPanel" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:MenuKeys.DisabledSubMenuItemBorderBrushKey}}" />
+			</Trigger>
+		</ControlTemplate.Triggers>
+	</ControlTemplate>
+
+</ResourceDictionary>

+ 130 - 0
PixiEditor/Styles/AvalonDock/Themes/Menu/MenuKeys.cs

@@ -0,0 +1,130 @@
+using System.Windows;
+
+namespace PixiEditor.Styles.AvalonDock.Themes.Menu
+{
+    /// <summary>
+    /// Class implements static resource keys that should be referenced to configure
+    /// menu specific colors, styles and other elements that are typically changed
+    /// between themes.
+    /// </summary>
+    public static class MenuKeys
+    {
+        /// <summary>
+        /// Gets the Brush key for the normal Menu separator border color.
+        /// </summary>
+        public static readonly ComponentResourceKey MenuSeparatorBorderBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "MenuSeparatorBorderBrushKey");
+
+        /// <summary>
+        /// Gets the Brush key for the normal background of a Sub-Menu-Item.
+        /// </summary>
+        public static readonly ComponentResourceKey SubmenuItemBackgroundKey = new ComponentResourceKey(typeof(ResourceKeys), "SubmenuItemBackgroundKey");
+
+        /// <summary>
+        /// Gets the Brush key for highlighting the background of a Menu-Item on mouse over.
+        /// </summary>
+        public static readonly ComponentResourceKey MenuItemHighlightedBackgroundKey = new ComponentResourceKey(typeof(ResourceKeys), "MenuItemHighlightedBackgroundKey");
+
+        /// <summary>
+        /// Gets the Brush key for highlighting the background of a Menu-Item on mouse over.
+        /// </summary>
+        public static readonly ComponentResourceKey SubmenuItemBackgroundHighlightedKey = new ComponentResourceKey(typeof(ResourceKeys), "SubmenuItemBackgroundHighlightedKey");
+
+        // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+
+        /// <summary>
+        /// Gets the background Brush key for a Menu Repeat button in IsPressed state.
+        /// (see context menu below)
+        /// </summary>
+        public static readonly ComponentResourceKey FocusScrollButtonBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "FocusScrollButtonBrushKey");
+
+        /// <summary>
+        /// Gets the background Brush key for a Context-Menu Repeat button in IsPressed state.
+        /// (see menu above)
+        /// </summary>
+        public static readonly ComponentResourceKey ScrollButtonBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "ScrollButtonBrushKey");
+
+        /// <summary>
+        /// Gets the background Brush key of a Checkmark in a menu or context menu.
+        /// (see menu above)
+        /// </summary>
+        public static readonly ComponentResourceKey CheckMarkBackgroundBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "CheckMarkBackgroundBrushKey");
+
+        /// <summary>
+        /// Gets the border Brush key of a Checkmark in a menu or context menu.
+        /// (see menu above)
+        /// </summary>
+        public static readonly ComponentResourceKey CheckMarkBorderBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "CheckMarkBorderBrushKey");
+
+        /// <summary>
+        /// Gets the foreground Brush key of a Checkmark in a menu or context menu.
+        /// (see menu above)
+        /// </summary>
+        public static readonly ComponentResourceKey CheckMarkForegroundBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "CheckMarkForegroundBrushKey");
+
+        /// <summary>
+        /// Gets the background Brush key of a disabled sub-menu-item.
+        /// (see menu above)
+        /// </summary>
+        public static readonly ComponentResourceKey DisabledSubMenuItemBackgroundBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "DisabledSubMenuItemBackgroundBrushKey");
+
+        /// <summary>
+        /// Gets the border Brush key of a disabled sub-menu-item.
+        /// (see menu above)
+        /// </summary>
+        public static readonly ComponentResourceKey DisabledSubMenuItemBorderBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "DisabledSubMenuItemBorderBrushKey");
+
+        /// <summary>
+        /// Gets the border Brush key of a disabled sub-menu-item.
+        /// (see menu above)
+        /// </summary>
+        public static readonly ComponentResourceKey MenuBorderBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "MenuBorderBrushKey");
+
+        /// <summary>
+        /// Gets the normal background Brush key of a menu.
+        /// (see menu above)
+        /// </summary>
+        public static readonly ComponentResourceKey MenuBackgroundKey = new ComponentResourceKey(typeof(ResourceKeys), "MenuBackgroundKey");
+
+        /// <summary>
+        /// Gets the normal background Brush key of the top level item in a menu (Files, Edit, ...).
+        /// (see menu above)
+        /// </summary>
+        public static readonly ComponentResourceKey TopLevelHeaderMenuBackgroundKey = new ComponentResourceKey(typeof(ResourceKeys), "TopLevelHeaderMenuBackgroundKey");
+
+        /// <summary>
+        /// Gets the normal text or foreground Brush key of a menu item.
+        /// (see menu above)
+        /// </summary>
+        public static readonly ComponentResourceKey TextBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "TextBrushKey");
+
+        /// <summary>
+        /// Gets the normal background Brush key of a selected menu item.
+        /// (see menu above)
+        /// </summary>
+        public static readonly ComponentResourceKey ItemBackgroundSelectedKey = new ComponentResourceKey(typeof(ResourceKeys), "ItemBackgroundSelectedKey");
+
+        /// <summary>
+        /// Gets the text or foreground Brush key of a menu item in disabled state.
+        /// (see menu above)
+        /// </summary>
+        public static readonly ComponentResourceKey ItemTextDisabledKey = new ComponentResourceKey(typeof(ResourceKeys), "ItemTextDisabledKey");
+
+        /// <summary>
+        /// Gets the normal background Brush key of a menu item.
+        /// (see menu above)
+        /// </summary>
+        public static readonly ComponentResourceKey NormalBackgroundBrushKey = new ComponentResourceKey(typeof(ResourceKeys), "NormalBackgroundBrushKey");
+
+        /// <summary>
+        /// Gets the background Brush key of a menu item in mouse over state.
+        /// (see menu above)
+        /// </summary>
+        public static readonly ComponentResourceKey ItemBackgroundHoverKey = new ComponentResourceKey(typeof(ResourceKeys), "ItemBackgroundHoverKey");
+
+        /// <summary>
+        /// Gets the Brush key that is applied to draw a drop shadow (if any) below a menu.
+        /// (see menu above)
+        /// </summary>
+        public static readonly ComponentResourceKey DropShadowEffectKey = new ComponentResourceKey(typeof(ResourceKeys), "DropShadowEffectKey");
+    }
+}

+ 8 - 0
PixiEditor/Styles/AvalonDock/Themes/Menu/NamespaceDoc.cs

@@ -0,0 +1,8 @@
+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
+	{
+	}
+}

+ 8 - 0
PixiEditor/Styles/AvalonDock/Themes/NamespaceDoc.cs

@@ -0,0 +1,8 @@
+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
+	{
+	}
+}

+ 582 - 0
PixiEditor/Styles/AvalonDock/Themes/OverlayButtons.xaml

@@ -0,0 +1,582 @@
+<ResourceDictionary
+	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+	xmlns:reskeys="clr-namespace:PixiEditor.Styles.AvalonDock.Themes"
+	xmlns:sys="clr-namespace:System;assembly=mscorlib">
+
+	<!--
+		This file contains the resource definitions for the docking button indicators
+		which are shown when the user drags a document or tool window to place it
+		somewhere else
+	-->
+
+	<!--
+		Defines the height and width of the docking indicator buttons that are shown when
+		documents or tool windows are dragged
+	-->
+	<sys:Double x:Key="{x:Static reskeys:ResourceKeys.DockingButtonWidthKey}">40</sys:Double>
+	<sys:Double x:Key="{x:Static reskeys:ResourceKeys.DockingButtonHeightKey}">40</sys:Double>
+
+	<!--  Left Dock Button pointing left  -->
+	<Viewbox
+		x:Key="DockAnchorableLeft"
+		x:Shared="false"
+		Stretch="Uniform">
+		<Grid Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}">
+			<Border
+				Padding="10"
+				Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}"
+				CornerRadius="5">
+				<Grid>
+					<Grid.ColumnDefinitions>
+						<ColumnDefinition Width="4*" />
+						<ColumnDefinition Width="4*" />
+						<ColumnDefinition Width="2*" />
+					</Grid.ColumnDefinitions>
+
+					<Border
+						Grid.Column="0"
+						Width="50"
+						Height="80"
+						Margin="5"
+						BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+						BorderThickness="20,5,5,5" />
+
+					<Border
+						Grid.Column="1"
+						Width="30"
+						Height="80"
+						Margin="5"
+						BorderBrush="Transparent"
+						BorderThickness="0" />
+
+					<Path
+						Grid.Column="1"
+						Width="25"
+						Height="12.5"
+						Data="F1M1,15L8,1 15,15z"
+						Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundArrowBrushKey}}"
+						RenderTransformOrigin="0.5,0.5"
+						Stretch="Fill">
+						<Path.RenderTransform>
+							<RotateTransform Angle="270" />
+						</Path.RenderTransform>
+					</Path>
+
+				</Grid>
+			</Border>
+		</Grid>
+	</Viewbox>
+
+	<!--  Right Dock Button pointing right  -->
+	<Viewbox
+		x:Key="DockAnchorableRight"
+		x:Shared="false"
+		Stretch="Uniform">
+		<Grid Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}">
+			<Border
+				Padding="10"
+				Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}"
+				CornerRadius="5">
+				<Grid>
+					<Grid.ColumnDefinitions>
+						<ColumnDefinition Width="2*" />
+						<ColumnDefinition Width="4*" />
+						<ColumnDefinition Width="4*" />
+					</Grid.ColumnDefinitions>
+
+					<Border
+						Grid.Column="1"
+						Width="50"
+						Height="80"
+						Margin="5"
+						BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+						BorderThickness="5,5,20,5" />
+
+					<Border
+						Grid.Column="0"
+						Width="30"
+						Height="80"
+						Margin="5"
+						BorderBrush="Transparent"
+						BorderThickness="0" />
+
+					<Path
+						Width="25"
+						Height="12.5"
+						Data="F1M1,15L8,1 15,15z"
+						Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundArrowBrushKey}}"
+						RenderTransformOrigin="0.5,0.5"
+						Stretch="Fill">
+						<Path.RenderTransform>
+							<RotateTransform Angle="90" />
+						</Path.RenderTransform>
+					</Path>
+				</Grid>
+			</Border>
+		</Grid>
+	</Viewbox>
+
+	<!--  Top Dock Button pointing up  -->
+	<Viewbox
+		x:Key="DockAnchorableTop"
+		x:Shared="false"
+		Stretch="Uniform">
+		<Grid Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}">
+			<Border
+				Padding="10"
+				Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}"
+				CornerRadius="5">
+				<Grid>
+					<Grid.RowDefinitions>
+						<RowDefinition Height="2*" />
+						<RowDefinition Height="4*" />
+						<RowDefinition Height="4*" />
+					</Grid.RowDefinitions>
+					<!--  Transparent Background to size content  -->
+
+					<Border
+						Grid.Row="0"
+						Width="80"
+						Height="50"
+						Margin="5"
+						BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+						BorderThickness="5,20,5,5" />
+
+					<Border
+						Grid.Row="1"
+						Width="80"
+						Height="30"
+						Margin="5"
+						BorderBrush="Transparent"
+						BorderThickness="0" />
+
+					<Path
+						Grid.Row="1"
+						Width="25"
+						Height="12.5"
+						Data="F1M1,15L8,1 15,15z"
+						Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundArrowBrushKey}}"
+						RenderTransformOrigin="0.5,0.5"
+						Stretch="Fill" />
+				</Grid>
+			</Border>
+		</Grid>
+	</Viewbox>
+
+	<!--  Bottom Dock Button pointing down  -->
+	<Viewbox
+		x:Key="DockAnchorableBottom"
+		x:Shared="false"
+		Stretch="Uniform">
+		<Grid Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}">
+			<Border
+				Padding="10"
+				Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}"
+				CornerRadius="5">
+				<Grid>
+					<Grid.RowDefinitions>
+						<RowDefinition Height="2*" />
+						<RowDefinition Height="4*" />
+						<RowDefinition Height="4*" />
+					</Grid.RowDefinitions>
+					<!--  Transparent Background to size content  -->
+
+					<Border
+						Grid.Row="1"
+						Width="80"
+						Height="50"
+						Margin="5"
+						BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+						BorderThickness="5,5,5,20" />
+
+					<Border
+						Grid.Row="0"
+						Width="80"
+						Height="30"
+						Margin="5"
+						BorderBrush="Transparent"
+						BorderThickness="0" />
+
+					<Path
+						Width="25"
+						Height="12.5"
+						Data="F1M1,15L8,1 15,15z"
+						Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundArrowBrushKey}}"
+						RenderTransformOrigin="0.5,0.5"
+						Stretch="Fill">
+						<Path.RenderTransform>
+							<RotateTransform Angle="180" />
+						</Path.RenderTransform>
+					</Path>
+				</Grid>
+			</Border>
+		</Grid>
+	</Viewbox>
+
+	<!--  Horizontal Split Dock Button with horizonatal dashed line in center  -->
+	<Viewbox
+		x:Key="DockDocumentTop"
+		x:Shared="false"
+		Stretch="Uniform">
+		<Border
+			Margin="5"
+			Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}"
+			CornerRadius="5">
+			<Grid>
+				<Grid.RowDefinitions>
+					<RowDefinition Height="*" />
+				</Grid.RowDefinitions>
+				<!--  Transparent Background to size content  -->
+
+				<Border
+					Grid.Row="0"
+					Width="40"
+					Height="40"
+					Margin="4.75"
+					BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+					BorderThickness="2.5,10,2.5,2.5" />
+
+				<Line
+					Margin="0,7.5,0,0"
+					VerticalAlignment="Center"
+					Stroke="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+					StrokeDashArray="1 1"
+					StrokeThickness="1"
+					X1="5"
+					X2="45"
+					Y1="0"
+					Y2="0" />
+			</Grid>
+		</Border>
+	</Viewbox>
+
+	<!--  Center Dock Button without dashed line in center  -->
+	<Viewbox
+		x:Key="DockDocumentInside"
+		x:Shared="false"
+		Stretch="Uniform">
+		<Border
+			Margin="5"
+			Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}"
+			CornerRadius="5">
+			<Grid>
+				<Grid.RowDefinitions>
+					<RowDefinition Height="*" />
+				</Grid.RowDefinitions>
+				<!--  Transparent Background to size content  -->
+
+				<Border
+					Grid.Row="0"
+					Width="40"
+					Height="40"
+					Margin="4.75"
+					BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+					BorderThickness="2.5,10,2.5,2.5" />
+			</Grid>
+		</Border>
+	</Viewbox>
+
+	<!--  Vertical Split Dock Button with vertical dashed line in center  -->
+	<Viewbox
+		x:Key="DockDocumentLeft"
+		x:Shared="false"
+		Stretch="Uniform">
+		<Border
+			Margin="5"
+			Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}"
+			CornerRadius="5">
+			<Grid>
+				<Grid.RowDefinitions>
+					<RowDefinition Height="*" />
+				</Grid.RowDefinitions>
+				<!--  Transparent Background to size content  -->
+
+				<Border
+					Grid.Row="0"
+					Width="40"
+					Height="40"
+					Margin="5"
+					BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+					BorderThickness="2.5,10,2.5,2.5" />
+
+				<Line
+					Margin="5"
+					HorizontalAlignment="Center"
+					Stroke="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+					StrokeDashArray="1 1"
+					StrokeThickness="1"
+					X1="0"
+					X2="0"
+					Y1="5"
+					Y2="40" />
+
+			</Grid>
+		</Border>
+	</Viewbox>
+
+	<!--  Horizontal Split Dock Button with horizonatal dashed line in center  -->
+	<Viewbox
+		x:Key="DockDocumentBottom"
+		x:Shared="false"
+		Stretch="Uniform">
+		<Border
+			Margin="5"
+			Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}"
+			CornerRadius="5">
+			<Grid>
+				<Grid.RowDefinitions>
+					<RowDefinition Height="*" />
+				</Grid.RowDefinitions>
+				<!--  Transparent Background to size content  -->
+
+				<Border
+					Grid.Row="0"
+					Width="40"
+					Height="40"
+					Margin="4.75"
+					BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+					BorderThickness="2.5,10,2.5,2.5" />
+
+				<Line
+					Margin="0,7.5,0,0"
+					VerticalAlignment="Center"
+					Stroke="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+					StrokeDashArray="1 1"
+					StrokeThickness="1"
+					X1="5"
+					X2="45"
+					Y1="0"
+					Y2="0" />
+			</Grid>
+		</Border>
+	</Viewbox>
+
+	<!--  Vertical Split Dock Button with vertical dashed line in center  -->
+	<Viewbox
+		x:Key="DockDocumentRight"
+		x:Shared="false"
+		Stretch="Uniform">
+		<Border
+			Margin="5"
+			Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}"
+			CornerRadius="5">
+			<Grid>
+				<Grid.RowDefinitions>
+					<RowDefinition Height="*" />
+				</Grid.RowDefinitions>
+				<!--  Transparent Background to size content  -->
+
+				<Border
+					Grid.Row="0"
+					Width="40"
+					Height="40"
+					Margin="5"
+					BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+					BorderThickness="2.5,10,2.5,2.5" />
+
+				<Line
+					Margin="5"
+					HorizontalAlignment="Center"
+					Stroke="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+					StrokeDashArray="1 1"
+					StrokeThickness="1"
+					X1="0"
+					X2="0"
+					Y1="0"
+					Y2="40" />
+
+			</Grid>
+		</Border>
+	</Viewbox>
+
+	<!--  AsAnchorablePane buttons  -->
+	<!--  DockDocumentAsAnchorableTop  -->
+	<Viewbox
+		x:Key="DockDocumentAsAnchorableTop"
+		x:Shared="false"
+		Stretch="Uniform">
+		<Border
+			Margin="5"
+			Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}"
+			CornerRadius="5">
+			<Grid Background="Transparent">
+				<Grid.RowDefinitions>
+					<RowDefinition Height="2*" />
+					<RowDefinition Height="4*" />
+					<RowDefinition Height="4*" />
+				</Grid.RowDefinitions>
+				<!--  Transparent Background to size content  -->
+
+				<Border
+					Grid.Row="0"
+					Width="80"
+					Height="50"
+					Margin="5"
+					BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+					BorderThickness="5,20,5,5" />
+
+				<Border
+					Grid.Row="1"
+					Width="80"
+					Height="30"
+					Margin="5"
+					BorderBrush="Transparent"
+					BorderThickness="0" />
+
+				<Path
+					Grid.Row="1"
+					Width="25"
+					Height="12.5"
+					Data="F1M1,15L8,1 15,15z"
+					Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundArrowBrushKey}}"
+					RenderTransformOrigin="0.5,0.5"
+					Stretch="Fill" />
+			</Grid>
+		</Border>
+	</Viewbox>
+
+	<!--  DockDocumentAsAnchorableRight  -->
+	<Viewbox
+		x:Key="DockDocumentAsAnchorableRight"
+		x:Shared="false"
+		Stretch="Uniform">
+		<Border
+			Margin="5"
+			Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}"
+			CornerRadius="5">
+			<Grid>
+				<Grid.ColumnDefinitions>
+					<ColumnDefinition Width="2*" />
+					<ColumnDefinition Width="4*" />
+					<ColumnDefinition Width="4*" />
+				</Grid.ColumnDefinitions>
+
+				<Border
+					Grid.Column="1"
+					Width="50"
+					Height="80"
+					Margin="5"
+					BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+					BorderThickness="5,5,20,5" />
+
+				<Border
+					Grid.Column="0"
+					Width="30"
+					Height="80"
+					Margin="5"
+					BorderBrush="Transparent"
+					BorderThickness="0" />
+
+				<Path
+					Width="25"
+					Height="12.5"
+					Data="F1M1,15L8,1 15,15z"
+					Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundArrowBrushKey}}"
+					RenderTransformOrigin="0.5,0.5"
+					Stretch="Fill">
+					<Path.RenderTransform>
+						<RotateTransform Angle="90" />
+					</Path.RenderTransform>
+				</Path>
+			</Grid>
+		</Border>
+	</Viewbox>
+
+	<!--  DockDocumentAsAnchorableBottom  -->
+	<Viewbox
+		x:Key="DockDocumentAsAnchorableBottom"
+		x:Shared="false"
+		Stretch="Uniform">
+		<Border
+			Margin="5"
+			Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}"
+			CornerRadius="5">
+			<Grid>
+				<Grid.RowDefinitions>
+					<RowDefinition Height="2*" />
+					<RowDefinition Height="4*" />
+					<RowDefinition Height="4*" />
+				</Grid.RowDefinitions>
+				<!--  Transparent Background to size content  -->
+
+				<Border
+					Grid.Row="1"
+					Width="80"
+					Height="50"
+					Margin="5"
+					BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+					BorderThickness="5,5,5,20" />
+
+				<Border
+					Grid.Row="0"
+					Width="80"
+					Height="30"
+					Margin="5"
+					BorderBrush="Transparent"
+					BorderThickness="0" />
+
+				<Path
+					Width="25"
+					Height="12.5"
+					Data="F1M1,15L8,1 15,15z"
+					Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundArrowBrushKey}}"
+					RenderTransformOrigin="0.5,0.5"
+					Stretch="Fill">
+					<Path.RenderTransform>
+						<RotateTransform Angle="180" />
+					</Path.RenderTransform>
+				</Path>
+			</Grid>
+		</Border>
+	</Viewbox>
+
+	<!--  DockDocumentAsAnchorableLeft  -->
+	<Viewbox
+		x:Key="DockDocumentAsAnchorableLeft"
+		x:Shared="false"
+		Stretch="Uniform">
+		<Border
+			Margin="5"
+			Background="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonStarBackgroundBrushKey}}"
+			CornerRadius="5">
+			<Grid Background="Transparent">
+				<Grid.ColumnDefinitions>
+					<ColumnDefinition Width="4*" />
+					<ColumnDefinition Width="4*" />
+					<ColumnDefinition Width="2*" />
+				</Grid.ColumnDefinitions>
+
+				<Border
+					Grid.Column="0"
+					Width="50"
+					Height="80"
+					Margin="5"
+					BorderBrush="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundBrushKey}}"
+					BorderThickness="20,5,5,5" />
+
+				<Border
+					Grid.Column="1"
+					Width="30"
+					Height="80"
+					Margin="5"
+					BorderBrush="Transparent"
+					BorderThickness="0" />
+
+				<Path
+					Grid.Column="1"
+					Width="25"
+					Height="12.5"
+					Data="F1M1,15L8,1 15,15z"
+					Fill="{DynamicResource {x:Static reskeys:ResourceKeys.DockingButtonForegroundArrowBrushKey}}"
+					RenderTransformOrigin="0.5,0.5"
+					Stretch="Fill">
+					<Path.RenderTransform>
+						<RotateTransform Angle="270" />
+					</Path.RenderTransform>
+				</Path>
+			</Grid>
+		</Border>
+	</Viewbox>
+
+</ResourceDictionary>

+ 180 - 0
PixiEditor/Styles/AvalonDock/Themes/ResourceKeys.cs

@@ -0,0 +1,180 @@
+using System.Windows;
+
+namespace PixiEditor.Styles.AvalonDock.Themes
+{
+    /// <summary>
+	/// 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>
+        /// 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
+	}
+}

+ 1 - 1
PixiEditor/Styles/ImageCheckBoxStyle.xaml

@@ -6,7 +6,7 @@
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type CheckBox}">
                     <StackPanel Orientation="Horizontal">
-                        <Image Cursor="Hand" x:Name="checkboxImage" Source="../Images/Eye-off.png" Width="36"/>
+                        <Image Cursor="Hand" x:Name="checkboxImage" Source="../Images/Eye-off.png"/>
                         <ContentPresenter/>
                     </StackPanel>
                     <ControlTemplate.Triggers>

+ 212 - 0
PixiEditor/ViewModels/SubViewModels/Main/DiscordViewModel.cs

@@ -0,0 +1,212 @@
+using System;
+using DiscordRPC;
+using PixiEditor.Models.DataHolders;
+using PixiEditor.Models.UserPreferences;
+
+namespace PixiEditor.ViewModels.SubViewModels.Main
+{
+    public class DiscordViewModel : SubViewModel<ViewModelMain>
+    {
+        private DiscordRpcClient client;
+        private string clientId;
+        private Document currentDocument;
+
+        public bool Enabled
+        {
+            get => client != null;
+            set
+            {
+                if (Enabled != value)
+                {
+                    if (value)
+                    {
+                        Start();
+                    }
+                    else
+                    {
+                        Stop();
+                    }
+                }
+            }
+        }
+
+        private bool showDocumentName = PreferencesSettings.GetPreference(nameof(ShowDocumentName), true);
+
+        public bool ShowDocumentName
+        {
+            get => showDocumentName;
+            set
+            {
+                if (showDocumentName != value)
+                {
+                    showDocumentName = value;
+                    UpdatePresence(currentDocument);
+                }
+            }
+        }
+
+        private bool showDocumentSize = PreferencesSettings.GetPreference(nameof(ShowDocumentSize), true);
+
+        public bool ShowDocumentSize
+        {
+            get => showDocumentSize;
+            set
+            {
+                if (showDocumentSize != value)
+                {
+                    showDocumentSize = value;
+                    UpdatePresence(currentDocument);
+                }
+            }
+        }
+
+        private bool showLayerCount = PreferencesSettings.GetPreference(nameof(ShowLayerCount), true);
+
+        public bool ShowLayerCount
+        {
+            get => showLayerCount;
+            set
+            {
+                if (showLayerCount != value)
+                {
+                    showLayerCount = value;
+                    UpdatePresence(currentDocument);
+                }
+            }
+        }
+
+        public DiscordViewModel(ViewModelMain owner, string clientId)
+            : base(owner)
+        {
+            Owner.BitmapManager.DocumentChanged += DocumentChanged;
+            this.clientId = clientId;
+
+            Enabled = PreferencesSettings.GetPreference<bool>("EnableRichPresence");
+            PreferencesSettings.AddCallback("EnableRichPresence", x => Enabled = (bool)x);
+            PreferencesSettings.AddCallback(nameof(ShowDocumentName), x => ShowDocumentName = (bool)x);
+            PreferencesSettings.AddCallback(nameof(ShowDocumentSize), x => ShowDocumentSize = (bool)x);
+            PreferencesSettings.AddCallback(nameof(ShowLayerCount), x => ShowLayerCount = (bool)x);
+
+            AppDomain.CurrentDomain.ProcessExit += (_, _) => Enabled = false;
+        }
+
+        public void Start()
+        {
+            client = new DiscordRpcClient(clientId);
+            client.OnReady += OnReady;
+            client.Initialize();
+        }
+
+        public void Stop()
+        {
+            client.ClearPresence();
+            client.Dispose();
+            client = null;
+        }
+
+        public void UpdatePresence(Document document)
+        {
+            if (client == null)
+            {
+                return;
+            }
+
+            RichPresence richPresence = NewDefaultRP();
+
+            if (document != null)
+            {
+                richPresence.WithTimestamps(new Timestamps(document.OpenedUTC));
+
+                richPresence.Details = ShowDocumentName ? $"Editing {document.Name}" : "Editing something (incognito)";
+
+                string state = string.Empty;
+
+                if (ShowDocumentSize)
+                {
+                    state = $"{document.Width}x{document.Height}";
+                }
+
+                if (ShowDocumentSize && ShowLayerCount)
+                {
+                    state += ", ";
+                }
+
+                if (ShowLayerCount)
+                {
+                    state += document.Layers.Count == 1 ? "1 Layer" : $"{document.Layers.Count} Layers";
+                }
+
+                richPresence.State = state;
+            }
+
+            client.SetPresence(richPresence);
+        }
+
+        private static RichPresence NewDefaultRP()
+        {
+            return new RichPresence
+            {
+                Details = "Staring at absolutely",
+                State = "nothing",
+                Buttons = new Button[]
+                {
+                    new Button() { Label = "Download PixiEditor", Url = "https://www.github.com/PixiEditor/PixiEditor/releases/latest" },
+                    new Button() { Label = "Watch trailer", Url = "https://youtu.be/QKnXBUY0Pqk" }
+                },
+
+                Assets = new Assets
+                {
+                    LargeImageKey = "editorlogo",
+                    LargeImageText = "You discovered PixiEditor's logo",
+                    SmallImageKey = "github",
+                    SmallImageText = "Download PixiEditor on GitHub (github.com/PixiEditor/PixiEditor)!"
+                },
+                Timestamps = new Timestamps()
+                {
+                    Start = DateTime.UtcNow
+                }
+            };
+        }
+
+        private void DocumentChanged(object sender, Models.Events.DocumentChangedEventArgs e)
+        {
+            if (currentDocument != null)
+            {
+                currentDocument.PropertyChanged -= DocumentPropertyChanged;
+                currentDocument.LayersChanged -= DocumentLayerChanged;
+            }
+
+            currentDocument = e.NewDocument;
+
+            if (currentDocument != null)
+            {
+                UpdatePresence(currentDocument);
+                currentDocument.PropertyChanged += DocumentPropertyChanged;
+                currentDocument.LayersChanged += DocumentLayerChanged;
+            }
+        }
+
+        private void DocumentLayerChanged(object sender, Models.Controllers.LayersChangedEventArgs e)
+        {
+            UpdatePresence(currentDocument);
+        }
+
+        private void DocumentPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+        {
+            if (e.PropertyName == "Name" || e.PropertyName == "Width" || e.PropertyName == "Height")
+            {
+                UpdatePresence(currentDocument);
+            }
+        }
+
+        private void OnReady(object sender, DiscordRPC.Message.ReadyMessage args)
+        {
+            UpdatePresence(Owner.BitmapManager.ActiveDocument);
+        }
+
+        ~DiscordViewModel()
+        {
+            Enabled = false;
+        }
+    }
+}

+ 5 - 1
PixiEditor/ViewModels/SubViewModels/Main/FileViewModel.cs

@@ -154,7 +154,11 @@ namespace PixiEditor.ViewModels.SubViewModels.Main
                 if (Importer.IsSupportedFile(dialog.FileName))
                 {
                     Open(dialog.FileName);
-                    Owner.BitmapManager.ActiveDocument = Owner.BitmapManager.Documents.Last();
+
+                    if (Owner.BitmapManager.Documents.Count > 0)
+                    {
+                        Owner.BitmapManager.ActiveDocument = Owner.BitmapManager.Documents.Last();
+                    }
                 }
             }
         }

+ 5 - 0
PixiEditor/ViewModels/SubViewModels/Main/IoViewModel.cs

@@ -91,6 +91,11 @@ namespace PixiEditor.ViewModels.SubViewModels.Main
         /// <param name="parameter">CommandParameter.</param>
         private void MouseMove(object parameter)
         {
+            if (Owner.BitmapManager.ActiveDocument == null)
+            {
+                return;
+            }
+
             Coordinates cords = new Coordinates(
                 (int)Owner.BitmapManager.ActiveDocument.MouseXOnCanvas,
                 (int)Owner.BitmapManager.ActiveDocument.MouseYOnCanvas);

+ 4 - 3
PixiEditor/ViewModels/SubViewModels/SubViewModel.cs

@@ -1,12 +1,13 @@
 namespace PixiEditor.ViewModels.SubViewModels
 {
-    public class SubViewModel<T> : ViewModelBase where T: ViewModelBase
+    public class SubViewModel<T> : ViewModelBase
+        where T : ViewModelBase
     {
         public T Owner { get; }
 
         public SubViewModel(T owner)
         {
             Owner = owner;
-        }        
+        }
     }
-}
+}

+ 29 - 0
PixiEditor/ViewModels/SubViewModels/UserPreferences/SettingsGroup.cs

@@ -0,0 +1,29 @@
+using System.ComponentModel;
+using PixiEditor.Helpers;
+using PixiEditor.Models.UserPreferences;
+
+namespace PixiEditor.ViewModels.SubViewModels.UserPreferences
+{
+    public class SettingsGroup : NotifyableObject
+    {
+        protected static T GetPreference<T>(string name)
+        {
+            return PreferencesSettings.GetPreference<T>(name);
+        }
+
+#nullable enable
+
+        protected static T? GetPreference<T>(string name, T? fallbackValue)
+        {
+            return PreferencesSettings.GetPreference(name, fallbackValue);
+        }
+
+#nullable disable
+
+        protected void RaiseAndUpdatePreference<T>(string name, T value)
+        {
+            RaisePropertyChanged(name);
+            PreferencesSettings.UpdatePreference(name, value);
+        }
+    }
+}

+ 89 - 0
PixiEditor/ViewModels/SubViewModels/UserPreferences/SettingsViewModel.cs

@@ -58,6 +58,95 @@ namespace PixiEditor.ViewModels.SubViewModels.UserPreferences
             }
         }
 
+        public class DiscordSettings : SettingsGroup
+        {
+            private bool enableRichPresence = GetPreference(nameof(EnableRichPresence), true);
+
+            public bool EnableRichPresence
+            {
+                get => enableRichPresence;
+                set
+                {
+                    enableRichPresence = value;
+                    RaiseAndUpdatePreference(nameof(EnableRichPresence), value);
+                }
+            }
+
+            private bool showDocumentName = GetPreference(nameof(ShowDocumentName), true);
+
+            public bool ShowDocumentName
+            {
+                get => showDocumentName;
+                set
+                {
+                    showDocumentName = value;
+                    RaiseAndUpdatePreference(nameof(ShowDocumentName), value);
+                    RaisePropertyChanged(nameof(DetailPreview));
+                }
+            }
+
+            private bool showDocumentSize = GetPreference(nameof(ShowDocumentSize), true);
+
+            public bool ShowDocumentSize
+            {
+                get => showDocumentSize;
+                set
+                {
+                    showDocumentSize = value;
+                    RaiseAndUpdatePreference(nameof(ShowDocumentSize), value);
+                    RaisePropertyChanged(nameof(StatePreview));
+                }
+            }
+
+            private bool showLayerCount = GetPreference(nameof(ShowLayerCount), true);
+
+            public bool ShowLayerCount
+            {
+                get => showLayerCount;
+                set
+                {
+                    showLayerCount = value;
+                    RaiseAndUpdatePreference(nameof(ShowLayerCount), value);
+                    RaisePropertyChanged(nameof(StatePreview));
+                }
+            }
+
+            public string DetailPreview
+            {
+                get
+                {
+                    return ShowDocumentName ? $"Editing coolPixelArt.pixi" : "Editing something (incognito)";
+                }
+            }
+
+            public string StatePreview
+            {
+                get
+                {
+                    string state = string.Empty;
+
+                    if (ShowDocumentSize)
+                    {
+                        state = "16x16";
+                    }
+
+                    if (ShowDocumentSize && ShowLayerCount)
+                    {
+                        state += ", ";
+                    }
+
+                    if (ShowLayerCount)
+                    {
+                        state += "2 Layers";
+                    }
+
+                    return state;
+                }
+            }
+        }
+
+        public DiscordSettings Discord { get; set; } = new DiscordSettings();
+
         public void RaiseAndUpdatePreference<T>(string name, T value)
         {
             RaisePropertyChanged(name);

+ 3 - 0
PixiEditor/ViewModels/ViewModelMain.cs

@@ -56,6 +56,8 @@ namespace PixiEditor.ViewModels
 
         public MiscViewModel MiscSubViewModel { get; set; }
 
+        public DiscordViewModel DiscordViewModel { get; set; }
+
         public BitmapManager BitmapManager { get; set; }
 
         public PixelChangesController ChangesController { get; set; }
@@ -88,6 +90,7 @@ namespace PixiEditor.ViewModels
             ColorsSubViewModel = new ColorsViewModel(this);
             DocumentSubViewModel = new DocumentViewModel(this);
             MiscSubViewModel = new MiscViewModel(this);
+            DiscordViewModel = new DiscordViewModel(this, "764168193685979138");
 
             ShortcutController = new ShortcutController
             {

+ 21 - 4
PixiEditor/Views/Dialogs/SettingsWindow.xaml

@@ -3,10 +3,12 @@
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-        xmlns:local="clr-namespace:PixiEditor.Views.Dialogs" xmlns:viewmodels="clr-namespace:PixiEditor.ViewModels" xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters" xmlns:views="clr-namespace:PixiEditor.Views" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:behaviours="clr-namespace:PixiEditor.Helpers.Behaviours"
+        xmlns:local="clr-namespace:PixiEditor.Views.Dialogs" xmlns:viewmodels="clr-namespace:PixiEditor.ViewModels" xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters" xmlns:views="clr-namespace:PixiEditor.Views" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:behaviours="clr-namespace:PixiEditor.Helpers.Behaviours" xmlns:usercontrols="clr-namespace:PixiEditor.Views.UserControls"
         mc:Ignorable="d"
         Title="Settings" Name="window" 
-        Height="450" Width="800" WindowStyle="None" DataContext="{DynamicResource SettingsWindowViewModel}"
+        Height="600" Width="800"
+        MinHeight="350" MinWidth="600"
+        WindowStyle="None" DataContext="{DynamicResource SettingsWindowViewModel}"
         BorderBrush="Black" BorderThickness="1">
     <Window.Resources>
         <viewmodels:SettingsWindowViewModel x:Key="SettingsWindowViewModel"/>
@@ -46,6 +48,8 @@
                     Command="{Binding SelectCategoryCommand}" CommandParameter="General">General</Button>
             <Button Style="{StaticResource AccentDarkRoundButton}" Margin="10 5 10 5" 
                     Command="{Binding SelectCategoryCommand}" CommandParameter="Updates">Updates</Button>
+            <Button Style="{StaticResource AccentDarkRoundButton}" Margin="10 5 10 5" 
+                    Command="{Binding SelectCategoryCommand}" CommandParameter="Discord">Discord</Button>
         </StackPanel>
         <Grid Grid.Row="1" Grid.Column="1" Background="{StaticResource AccentColor}">
             <Grid Visibility="{Binding SelectedCategory, Converter={StaticResource EqualityBoolToVisibilityConverter},
@@ -58,9 +62,9 @@
                         <Label Content="Default new file size:" Style="{StaticResource Header2}" Margin="0 20 0 20"/>
                         <StackPanel Orientation="Horizontal" Margin="40,0,0,0">
                             <Label Content="Width:" Style="{StaticResource BaseLabel}"/>
-                            <views:SizeInput Size="{Binding SettingsSubViewModel.DefaultNewFileWidth, Mode=TwoWay}" Width="60" Height="25"/>
+                            <views:SizeInput FontSize="16" Size="{Binding SettingsSubViewModel.DefaultNewFileWidth, Mode=TwoWay}" Width="60" Height="25"/>
                             <Label Content="Height:" Style="{StaticResource BaseLabel}"/>
-                            <views:SizeInput Size="{Binding SettingsSubViewModel.DefaultNewFileHeight, Mode=TwoWay}" Width="60" Height="25"/>
+                            <views:SizeInput FontSize="16" Size="{Binding SettingsSubViewModel.DefaultNewFileHeight, Mode=TwoWay}" Width="60" Height="25"/>
                         </StackPanel>
                     </StackPanel>
                 </StackPanel>
@@ -74,6 +78,19 @@
                     </StackPanel>
                 </StackPanel>
             </Grid>
+            <Grid Visibility="{Binding SelectedCategory, Converter={StaticResource EqualityBoolToVisibilityConverter},
+            ConverterParameter='Discord'}">
+                <StackPanel Orientation="Vertical">
+                    <Label Style="{StaticResource Header1}" Content="Rich Presence"/>
+                    <StackPanel Orientation="Vertical" Margin="50 0 50 0">
+                        <CheckBox Margin="5" IsChecked="{Binding SettingsSubViewModel.Discord.EnableRichPresence}" Content="Enabled"/>
+                        <CheckBox Margin="5" IsEnabled="{Binding SettingsSubViewModel.Discord.EnableRichPresence}" IsChecked="{Binding SettingsSubViewModel.Discord.ShowDocumentName}" Content="Show Document Name"/>
+                        <CheckBox Margin="5" IsEnabled="{Binding SettingsSubViewModel.Discord.EnableRichPresence}" IsChecked="{Binding SettingsSubViewModel.Discord.ShowDocumentSize}" Content="Show Document Size"/>
+                        <CheckBox Margin="5" IsEnabled="{Binding SettingsSubViewModel.Discord.EnableRichPresence}" IsChecked="{Binding SettingsSubViewModel.Discord.ShowLayerCount}" Content="Show Layer Count"/>
+                        <usercontrols:DiscordRPPreview Margin="5" State="{Binding SettingsSubViewModel.Discord.StatePreview}" Detail="{Binding SettingsSubViewModel.Discord.DetailPreview}" Width="280" IsPlaying="{Binding SettingsSubViewModel.Discord.EnableRichPresence}"/>
+                    </StackPanel>
+                </StackPanel>
+            </Grid>
         </Grid>
     </Grid>
 </Window>

+ 187 - 155
PixiEditor/Views/MainWindow.xaml

@@ -10,7 +10,8 @@
         xmlns:ui="clr-namespace:PixiEditor.Helpers.UI"
         xmlns:cmd="http://www.galasoft.ch/mvvmlight" 
         xmlns:avalondock="https://github.com/Dirkster99/AvalonDock"
-        xmlns:colorpicker="clr-namespace:ColorPicker;assembly=ColorPicker" xmlns:usercontrols="clr-namespace:PixiEditor.Views.UserControls" xmlns:behaviours="clr-namespace:PixiEditor.Helpers.Behaviours"
+        xmlns:colorpicker="clr-namespace:ColorPicker;assembly=ColorPicker" xmlns:usercontrols="clr-namespace:PixiEditor.Views.UserControls" xmlns:behaviours="clr-namespace:PixiEditor.Helpers.Behaviours" 
+        xmlns:avalonDockTheme="clr-namespace:PixiEditor.Styles.AvalonDock"
         mc:Ignorable="d" WindowStyle="None" Initialized="MainWindow_Initialized"
         Title="PixiEditor" Name="mainWindow" Height="1000" Width="1600" Background="{StaticResource MainColor}"
         WindowStartupLocation="CenterScreen" WindowState="Maximized" DataContext="{DynamicResource ViewModelMain}">
@@ -61,7 +62,6 @@
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="45" />
             <ColumnDefinition Width="1*" />
-            <ColumnDefinition Width="290" />
         </Grid.ColumnDefinitions>
         <Grid.RowDefinitions>
             <RowDefinition Height="30" />
@@ -147,8 +147,10 @@
                         Command="{x:Static SystemCommands.CloseWindowCommand}" />
             </StackPanel>
         </DockPanel>
-        <StackPanel Background="{StaticResource AccentColor}" Orientation="Horizontal" Grid.ColumnSpan="3" Grid.Column="0"
+        <StackPanel Background="{StaticResource MainColor}" Orientation="Horizontal" Grid.ColumnSpan="3" Grid.Column="0"
                      Grid.Row="1">
+            <Label Style="{StaticResource BaseLabel}" Margin="10,0,0,0" FontSize="12" VerticalAlignment="Center" Content="{Binding BitmapManager.SelectedTool.ToolName}"/>
+            <Label Style="{StaticResource BaseLabel}" Padding="0" FontSize="12" VerticalAlignment="Center" Content="tool"/>
             <ItemsControl ItemsSource="{Binding BitmapManager.SelectedTool.Toolbar.Settings}">
                 <ItemsControl.ItemsPanel>
                     <ItemsPanelTemplate>
@@ -161,28 +163,34 @@
                             <Label
                                 Visibility="{Binding HasLabel, Converter={StaticResource BoolToVisibilityConverter}}"
                                 Foreground="White" Content="{Binding Label}" />
-                            <ContentPresenter Content="{Binding SettingControl}" />
+                            <ContentControl Content="{Binding SettingControl}" />
                         </StackPanel>
                     </DataTemplate>
                 </ItemsControl.ItemTemplate>
             </ItemsControl>
         </StackPanel>
-        <Grid Grid.Column="1" Grid.Row="2" Background="#303030" Margin="0,7,5,0">
+        <Grid Grid.Column="1" Grid.Row="2" Background="#303030">
             <Grid>
-                <avalondock:DockingManager ActiveContent="{Binding BitmapManager.ActiveDocument, Mode=TwoWay}" 
+                <DockingManager ActiveContent="{Binding BitmapManager.ActiveDocument, Mode=TwoWay}" 
                                            DocumentsSource="{Binding BitmapManager.Documents}">
-                    <avalondock:DockingManager.Theme>
-                        <avalondock:Vs2013DarkTheme/>
-                    </avalondock:DockingManager.Theme>
-                    <avalondock:DockingManager.LayoutItemContainerStyle>
-                        <Style TargetType="{x:Type avalondock:LayoutItem}">
-                            <Setter Property="Title" Value="{Binding Model.Name}" />
-                            <Setter Property="CloseCommand" Value="{Binding Model.RequestCloseDocumentCommand}" />
-                        </Style>
-                    </avalondock:DockingManager.LayoutItemContainerStyle>
-                    <avalondock:DockingManager.LayoutItemTemplate>
-                        <DataTemplate DataType="{x:Type vm:ViewModelMain}">
-                            <usercontrols:DrawingViewPort
+                    <DockingManager.Theme>
+                        <avalonDockTheme:PixiEditorDockTheme />
+                    </DockingManager.Theme>
+                    <avalondock:DockingManager.LayoutItemContainerStyleSelector>
+                        <ui:PanelsStyleSelector>
+                            <ui:PanelsStyleSelector.DocumentTabStyle>
+                                <Style TargetType="{x:Type avalondock:LayoutItem}">
+                                    <Setter Property="Title" Value="{Binding Model.Name}" />
+                                    <Setter Property="CloseCommand" Value="{Binding Model.RequestCloseDocumentCommand}" />
+                                </Style>
+                            </ui:PanelsStyleSelector.DocumentTabStyle>
+                        </ui:PanelsStyleSelector>
+                    </avalondock:DockingManager.LayoutItemContainerStyleSelector>
+                    <DockingManager.LayoutItemTemplateSelector>
+                        <ui:DocumentsTemplateSelector>
+                            <ui:DocumentsTemplateSelector.DocumentsViewTemplate>
+                                <DataTemplate DataType="{x:Type vm:ViewModelMain}">
+                                    <usercontrols:DrawingViewPort
                                         ZoomPercentage="{Binding ZoomPercentage}"
                                         RecenterZoombox="{Binding RecenterZoombox}"
                                         Cursor="{Binding XamlAccesibleViewModel.ToolsSubViewModel.ToolCursor}"
@@ -192,15 +200,155 @@
                                         MouseDownCommand="{Binding XamlAccesibleViewModel.IoSubViewModel.MouseDownCommand}"
                                         MouseXOnCanvas="{Binding MouseXOnCanvas, Mode=TwoWay}"
                                         MouseYOnCanvas="{Binding MouseYOnCanvas, Mode=TwoWay}">
-                                <i:Interaction.Triggers>
-                                    <i:EventTrigger EventName="PreviewMouseDown">
-                                        <i:InvokeCommandAction Command="{Binding SetAsActiveOnClickCommand}"/>
-                                    </i:EventTrigger>
-                                </i:Interaction.Triggers>
-                            </usercontrols:DrawingViewPort>
-                        </DataTemplate>
-                    </avalondock:DockingManager.LayoutItemTemplate>
-                </avalondock:DockingManager>
+                                        <i:Interaction.Triggers>
+                                            <i:EventTrigger EventName="PreviewMouseDown">
+                                                <i:InvokeCommandAction Command="{Binding SetAsActiveOnClickCommand}"/>
+                                            </i:EventTrigger>
+                                        </i:Interaction.Triggers>
+                                    </usercontrols:DrawingViewPort>
+                                </DataTemplate>
+                            </ui:DocumentsTemplateSelector.DocumentsViewTemplate>
+                        </ui:DocumentsTemplateSelector>
+                    </DockingManager.LayoutItemTemplateSelector>
+                    <avalondock:LayoutRoot x:Name="LayoutRoot">
+                        <LayoutPanel Orientation="Horizontal">
+                            <LayoutDocumentPane/>
+                            <LayoutAnchorablePaneGroup Orientation="Vertical" DockWidth="290">
+                                <LayoutAnchorablePane>
+                                <LayoutAnchorable ContentId="colorPicker" Title="Color Picker" CanHide="False"
+                                                             CanClose="False" CanAutoHide="False"
+                                                             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"
+                                              VerticalScrollBarVisibility="Auto">
+                                        <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"
+                                                                        Stretch="UniformToFill">
+                                                                    <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
+                                                                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"
+                                                                      Command="{Binding ColorsSubViewModel.RemoveSwatchCommand, Source={StaticResource ViewModelMain}}"
+                                                                      CommandParameter="{Binding}" />
+                                                            </ContextMenu>
+                                                        </Grid.ContextMenu>
+                                                    </Grid>
+                                                </DataTemplate>
+                                            </ItemsControl.ItemTemplate>
+                                        </ItemsControl>
+                                    </ScrollViewer>
+                                </avalondock:LayoutAnchorable>
+                            </LayoutAnchorablePane>
+                                <LayoutAnchorablePane>
+                                    <LayoutAnchorable ContentId="layers" Title="Layers" CanHide="False"
+                                                         CanClose="False" CanAutoHide="False"
+                                                         CanDockAsTabbedDocument="True" CanFloat="True">
+                                        <Grid>
+                                            <Grid.RowDefinitions>
+                                                <RowDefinition Height="40"/>
+                                                <RowDefinition Height="30"/>
+                                                <RowDefinition Height="15"/>
+                                                <RowDefinition Height="1*"/>
+                                            </Grid.RowDefinitions>
+                                            <Button Grid.Row="0" Command="{Binding LayersSubViewModel.NewLayerCommand}" Height="30" Content="New Layer"
+                                            HorizontalAlignment="Stretch" Margin="5"
+                                            Style="{StaticResource DarkRoundButton}" />
+                                            <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,0">
+                                                <Label Content="Opacity" Foreground="White" VerticalAlignment="Center"/>
+                                                <vws:NumberInput Min="0" Max="100" Width="40" Height="20" VerticalAlignment="Center"
+                                                         Value="{Binding BitmapManager.ActiveDocument.ActiveLayer.Opacity, Mode=TwoWay, 
+                                            Converter={StaticResource FloatNormalizeConverter}}" />
+                                                <Label Content="%" Foreground="White" VerticalAlignment="Center"/>
+                                            </StackPanel>
+                                            <Separator Grid.Row="2" Background="{StaticResource BrighterAccentColor}"/>
+                                            <ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Auto">
+                                                <ItemsControl ItemsSource="{Binding BitmapManager.ActiveDocument.Layers}"
+                                                      x:Name="layersItemsControl" AlternationCount="9999">
+                                                    <ItemsControl.ItemsPanel>
+                                                        <ItemsPanelTemplate>
+                                                            <ui:ReversedOrderStackPanel Orientation="Vertical" />
+                                                        </ItemsPanelTemplate>
+                                                    </ItemsControl.ItemsPanel>
+                                                    <ItemsControl.ItemTemplate>
+                                                        <DataTemplate>
+                                                            <vws:LayerItem LayerIndex="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},
+                                Path=(ItemsControl.AlternationIndex)}" SetActiveLayerCommand="{Binding Path=DataContext.LayersSubViewModel.SetActiveLayerCommand, ElementName=mainWindow}"
+                                                                   LayerName="{Binding Name, Mode=TwoWay}" IsActive="{Binding IsActive, Mode=TwoWay}"
+                                                                   IsRenaming="{Binding IsRenaming, Mode=TwoWay}"
+                                                                   PreviewImage="{Binding LayerBitmap}"
+                                                                   MoveToBackCommand="{Binding DataContext.LayersSubViewModel.MoveToBackCommand, ElementName=mainWindow}"
+                                                                   MoveToFrontCommand="{Binding DataContext.LayersSubViewModel.MoveToFrontCommand, ElementName=mainWindow}">
+                                                                <vws:LayerItem.ContextMenu>
+                                                                    <ContextMenu>
+                                                                        <MenuItem Header="Delete"
+                                                                                  Command="{Binding LayersSubViewModel.DeleteLayerCommand, Source={StaticResource ViewModelMain}}"
+                                                                                  CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},
+                                Path=(ItemsControl.AlternationIndex)}" />
+                                                                        <MenuItem Header="Rename"
+                                                                                  Command="{Binding LayersSubViewModel.RenameLayerCommand, Source={StaticResource ViewModelMain}}"
+                                                                                  CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},
+                                Path=(ItemsControl.AlternationIndex)}" />
+                                                                        <MenuItem Header="Move to front"
+                                                                                  Command="{Binding LayersSubViewModel.MoveToFrontCommand, Source={StaticResource ViewModelMain}}"
+                                                                                  CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},
+                                Path=(ItemsControl.AlternationIndex)}" />
+                                                                        <MenuItem Header="Move to back"
+                                                                                  Command="{Binding LayersSubViewModel.MoveToBackCommand, Source={StaticResource ViewModelMain}}"
+                                                                                  CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},
+                                Path=(ItemsControl.AlternationIndex)}" />
+                                                                    </ContextMenu>
+                                                                </vws:LayerItem.ContextMenu>
+                                                            </vws:LayerItem>
+                                                        </DataTemplate>
+                                                    </ItemsControl.ItemTemplate>
+                                                </ItemsControl>
+                                            </ScrollViewer>
+                                        </Grid>
+                                    </LayoutAnchorable>
+                                </LayoutAnchorablePane>
+                            </LayoutAnchorablePaneGroup>
+                        </LayoutPanel>
+                    </avalondock:LayoutRoot>
+                </DockingManager>
             </Grid>
         </Grid>
 
@@ -225,138 +373,21 @@
             </ItemsControl>
         </StackPanel>
 
-        <Grid Grid.Column="2" Background="{StaticResource AccentColor}" Grid.Row="2" Grid.RowSpan="1">
+        <!--<Grid Grid.Column="2" Background="{StaticResource AccentColor}" Grid.Row="2" Grid.RowSpan="1">
             <avalondock:DockingManager Foreground="White" Background="{StaticResource AccentColor}" BorderThickness="0">
-                <avalondock:LayoutRoot x:Name="LayoutRoot">
-                    <avalondock:LayoutPanel Orientation="Vertical">
-                        <LayoutAnchorablePane DockHeight="1.3*" DockWidth="*">
-                            <LayoutAnchorable ContentId="colorPicker" Title="Color Picker" CanHide="False"
-                                                             CanClose="False" CanAutoHide="False"
-                                                             CanDockAsTabbedDocument="True" CanFloat="True">
-                                <colorpicker:StandardColorPicker Grid.Row="0" SelectedColor="{Binding ColorsSubViewModel.PrimaryColor, Mode=TwoWay}"
-                                     SecondaryColor="{Binding ColorsSubViewModel.SecondaryColor, Mode=TwoWay}" Style="{StaticResource DefaultColorPickerStyle}" />
-                            </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,0,0,0" Orientation="Horizontal"
-                                                           VerticalAlignment="Top" HorizontalAlignment="Left" />
-                                            </ItemsPanelTemplate>
-                                        </ItemsControl.ItemsPanel>
-                                        <ItemsControl.ItemTemplate>
-                                            <DataTemplate>
-                                                <Grid Width="50" Height="50" Margin="2">
-                                                    <Border Width="48" Height="48">
-                                                        <Border.Background>
-                                                            <ImageBrush ImageSource="../Images/transparentbg.png"
-                                                                        Stretch="UniformToFill">
-                                                                <ImageBrush.RelativeTransform>
-                                                                    <ScaleTransform ScaleX="6" ScaleY="6" CenterX="0.5"
-                                                                                    CenterY="0.5" />
-                                                                </ImageBrush.RelativeTransform>
-                                                            </ImageBrush>
-                                                        </Border.Background>
-                                                    </Border>
-                                                    <Border BorderThickness="0.25" Cursor="Hand" BorderBrush="White">
-                                                        <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"
-                                                                      Command="{Binding ColorsSubViewModel.RemoveSwatchCommand, Source={StaticResource ViewModelMain}}"
-                                                                      CommandParameter="{Binding}" />
-                                                        </ContextMenu>
-                                                    </Grid.ContextMenu>
-                                                </Grid>
-                                            </DataTemplate>
-                                        </ItemsControl.ItemTemplate>
-                                    </ItemsControl>
-                                </ScrollViewer>
-                            </avalondock:LayoutAnchorable>
-                        </LayoutAnchorablePane>
-                        <avalondock:LayoutAnchorablePane>
-                            <avalondock:LayoutAnchorable ContentId="layers" Title="Layers" CanHide="False"
-                                                         CanClose="False" CanAutoHide="False"
-                                                         CanDockAsTabbedDocument="True" CanFloat="True">
-                                <StackPanel Orientation="Vertical">
-                                    <Button Command="{Binding LayersSubViewModel.NewLayerCommand}" Height="30" Content="New Layer"
-                                            HorizontalAlignment="Stretch" Margin="5"
-                                            Style="{StaticResource DarkRoundButton}" />
-                                    <StackPanel Orientation="Horizontal" Margin="10,0">
-                                        <Label Content="Opacity" Foreground="White" VerticalAlignment="Center"/>
-                                        <vws:NumberInput Min="0" Max="100" Width="40" Height="20" VerticalAlignment="Center"
-                                                         Value="{Binding BitmapManager.ActiveDocument.ActiveLayer.Opacity, Mode=TwoWay, 
-                                            Converter={StaticResource FloatNormalizeConverter}}" />
-                                        <Label Content="%" Foreground="White" VerticalAlignment="Center"/>
-                                    </StackPanel>
-                                    <Separator Background="{StaticResource BrighterAccentColor}" Margin="0,10,0,10"/>
-                                    <ItemsControl ItemsSource="{Binding BitmapManager.ActiveDocument.Layers}"
-                                                  x:Name="layersItemsControl" AlternationCount="9999">
-                                        <ItemsControl.ItemsPanel>
-                                            <ItemsPanelTemplate>
-                                                <ui:ReversedOrderStackPanel Orientation="Vertical" />
-                                            </ItemsPanelTemplate>
-                                        </ItemsControl.ItemsPanel>
-                                        <ItemsControl.ItemTemplate>
-                                            <DataTemplate>
-                                                <vws:LayerItem LayerIndex="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},
-                            Path=(ItemsControl.AlternationIndex)}" SetActiveLayerCommand="{Binding Path=DataContext.LayersSubViewModel.SetActiveLayerCommand, ElementName=mainWindow}"
-                                                               LayerName="{Binding Name, Mode=TwoWay}" IsActive="{Binding IsActive, Mode=TwoWay}"
-                                                               IsRenaming="{Binding IsRenaming, Mode=TwoWay}"
-                                                               MoveToBackCommand="{Binding DataContext.LayersSubViewModel.MoveToBackCommand, ElementName=mainWindow}"
-                                                               MoveToFrontCommand="{Binding DataContext.LayersSubViewModel.MoveToFrontCommand, ElementName=mainWindow}">
-                                                    <vws:LayerItem.ContextMenu>
-                                                        <ContextMenu>
-                                                            <MenuItem Header="Delete"
-                                                                              Command="{Binding LayersSubViewModel.DeleteLayerCommand, Source={StaticResource ViewModelMain}}"
-                                                                              CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},
-                            Path=(ItemsControl.AlternationIndex)}" />
-                                                            <MenuItem Header="Rename"
-                                                                              Command="{Binding LayersSubViewModel.RenameLayerCommand, Source={StaticResource ViewModelMain}}"
-                                                                              CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},
-                            Path=(ItemsControl.AlternationIndex)}" />
-                                                            <MenuItem Header="Move to front"
-                                                                              Command="{Binding LayersSubViewModel.MoveToFrontCommand, Source={StaticResource ViewModelMain}}"
-                                                                              CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},
-                            Path=(ItemsControl.AlternationIndex)}" />
-                                                            <MenuItem Header="Move to back"
-                                                                              Command="{Binding LayersSubViewModel.MoveToBackCommand, Source={StaticResource ViewModelMain}}"
-                                                                              CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},
-                            Path=(ItemsControl.AlternationIndex)}" />
-                                                        </ContextMenu>
-                                                    </vws:LayerItem.ContextMenu>
-                                                </vws:LayerItem>
-                                            </DataTemplate>
-                                        </ItemsControl.ItemTemplate>
-                                    </ItemsControl>
-                                </StackPanel>
-                            </avalondock:LayoutAnchorable>
-                        </avalondock:LayoutAnchorablePane>
-                        
-                    </avalondock:LayoutPanel>
-                </avalondock:LayoutRoot>
+
                 <avalondock:DockingManager.Theme>
-                    <avalondock:Vs2013DarkTheme />
+                    <avalonDockTheme:PixiEditorDockTheme />
                 </avalondock:DockingManager.Theme>
             </avalondock:DockingManager>
-        </Grid>
-        <DockPanel Grid.Row="3" Grid.Column="1">
-            <TextBlock Text="{Binding BitmapManager.SelectedTool.ActionDisplay}" Foreground="White" FontSize="15"  VerticalAlignment="Center"/>
+        </Grid>-->
+        <Grid Grid.Row="3" Grid.Column="1">
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="*"/>
+                <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"/>
@@ -372,5 +403,6 @@
             <TextBlock VerticalAlignment="Center" Padding="10" HorizontalAlignment="Right"
                        Foreground="White" FontSize="14"  Text="{Binding UpdateSubViewModel.VersionText}" />
         </StackPanel>
+        </Grid>
     </Grid>
 </Window>

+ 8 - 0
PixiEditor/Views/MainWindow.xaml.cs

@@ -69,6 +69,14 @@ namespace PixiEditor
         }
 
         private void MainWindow_Initialized(object sender, EventArgs e)
+        {
+            AppDomain.CurrentDomain.UnhandledException += (sender, e) => Helpers.CrashHelper.SaveCrashInfo((Exception)e.ExceptionObject);
+#if RELEASE
+            CheckForDownloadedUpdates();
+#endif
+        }
+
+        private void CheckForDownloadedUpdates()
         {
             string dir = AppDomain.CurrentDomain.BaseDirectory;
             UpdateDownloader.CreateTempDirectory();

+ 68 - 0
PixiEditor/Views/UserControls/DiscordRPPreview.xaml

@@ -0,0 +1,68 @@
+<UserControl x:Class="PixiEditor.Views.UserControls.DiscordRPPreview"
+             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:local="clr-namespace:PixiEditor.Views.UserControls" xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters"
+             mc:Ignorable="d" 
+             d:DesignHeight="280" d:DesignWidth="300"
+             x:Name="uc">
+    <UserControl.Resources>
+        <converters:EmptyStringToVisibiltyConverter x:Key="EmptyStringToVisibilty"/>
+        <BoolToVisibilityConverter x:Key="BoolToVisibilty"/>
+        <converters:BoolToBrushConverter x:Key="BoolToBrush"/>
+        <converters:BrushTuple FirstBrush="#7289da" SecondBrush="#202225" x:Key="BackgroundBrushTuple"/>
+        <converters:BrushTuple FirstBrush="White" SecondBrush="#7289da" x:Key="BotLabelTuple"/>
+        <converters:BrushTuple FirstBrush="#7289da" SecondBrush="White" x:Key="BotTextTuple"/>
+        <converters:BrushTuple FirstBrush="White" SecondBrush="#b9bbbe" x:Key="DiscriminatorTuple"/>
+    </UserControl.Resources>
+    <Grid>
+        <Grid.OpacityMask>
+            <VisualBrush Visual="{Binding ElementName=OutsideBorder}"/>
+        </Grid.OpacityMask>
+        <Border CornerRadius="5" Background="{Binding ElementName=uc, Path=IsPlaying, Converter={StaticResource BoolToBrush}, ConverterParameter={StaticResource BackgroundBrushTuple}}" x:Name="OutsideBorder"/>
+        <Grid x:Name="background">
+            <Grid.RowDefinitions>
+                    <RowDefinition Height="Auto"/>
+                    <RowDefinition Height="Auto"/>
+                </Grid.RowDefinitions>
+
+                <Grid VerticalAlignment="Center">
+                    <StackPanel>
+                        <Grid  Width="80" Height="80" Margin="20">
+                            <Image Source="{Binding ElementName=uc, Path=UserSource}"/>
+                        <Border Height="30" Width="30" Background="#FF43B581" CornerRadius="90" BorderThickness="5" BorderBrush="{Binding ElementName=uc, Path=IsPlaying, Converter={StaticResource BoolToBrush}, ConverterParameter={StaticResource BackgroundBrushTuple}}">
+                                <Border.RenderTransform>
+                                    <TransformGroup>
+                                        <TranslateTransform X="27" Y="27"></TranslateTransform>
+                                    </TransformGroup>
+                                </Border.RenderTransform>
+                            </Border>
+                        </Grid>
+
+                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,15">
+                            <TextBlock Foreground="White" FontSize="16" FontWeight="SemiBold">PixiBot</TextBlock>
+                        <TextBlock Foreground="{Binding ElementName=uc, Path=IsPlaying, Converter={StaticResource BoolToBrush}, ConverterParameter={StaticResource DiscriminatorTuple}}" FontSize="16">#8523</TextBlock>
+                            <Border CornerRadius="3" BorderThickness="1" Background="{Binding ElementName=uc, Path=IsPlaying, Converter={StaticResource BoolToBrush}, ConverterParameter={StaticResource BotLabelTuple}}" Margin="5,0,0,0" VerticalAlignment="Center">
+                            <TextBlock Foreground="{Binding ElementName=uc, Path=IsPlaying, Converter={StaticResource BoolToBrush}, ConverterParameter={StaticResource BotTextTuple}}" FontSize="12" Margin="4,2,4,2" FontWeight="Medium">BOT</TextBlock>
+                            </Border>
+                        </StackPanel>
+                    </StackPanel>
+                </Grid>
+                <Grid Grid.Row="1" Background="#0D000000" Visibility="{Binding ElementName=uc, Path=IsPlaying, Converter={StaticResource BoolToVisibilty}}">
+                    <StackPanel Orientation="Vertical" Margin="15">
+                        <TextBlock FontWeight="Bold" FontSize="12" Foreground="White" Margin="0,0,0,10">PLAYING A "GAME"</TextBlock>
+                        <StackPanel Orientation="Horizontal">
+                            <Image Source="../../Images/PixiEditorLogo.png" Height="70"/>
+                            <StackPanel Margin="15,0,0,0" VerticalAlignment="Center">
+                                <TextBlock Foreground="White" FontSize="12" FontWeight="SemiBold">PixiEditor</TextBlock>
+                            <TextBlock Foreground="White" FontSize="12" Text="{Binding ElementName=uc, Path=Detail}" Visibility="{Binding ElementName=uc, Path=Detail, Converter={StaticResource EmptyStringToVisibilty}}"/>
+                            <TextBlock Foreground="White" FontSize="12" Text="{Binding ElementName=uc, Path=State}" Visibility="{Binding ElementName=uc, Path=State, Converter={StaticResource EmptyStringToVisibilty}}"/>
+                            <TextBlock Foreground="White" FontSize="12">00:00 elapsed</TextBlock>
+                            </StackPanel>
+                        </StackPanel>
+                    </StackPanel>
+                </Grid>
+            </Grid>
+        </Grid>
+</UserControl>

+ 67 - 0
PixiEditor/Views/UserControls/DiscordRPPreview.xaml.cs

@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+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.UserControls
+{
+    /// <summary>
+    /// Interaction logic for DiscordRPPreview.xaml
+    /// </summary>
+    public partial class DiscordRPPreview : UserControl
+    {
+        public static readonly DependencyProperty StateProperty =
+               DependencyProperty.Register(nameof(State), typeof(string), typeof(DiscordRPPreview), new PropertyMetadata("nothing"));
+
+        public string State
+        {
+            get => (string)GetValue(StateProperty);
+            set => SetValue(StateProperty, value);
+        }
+
+        public static readonly DependencyProperty DetailProperty =
+                DependencyProperty.Register(nameof(Detail), typeof(string), typeof(DiscordRPPreview), new PropertyMetadata("Staring at absolutely"));
+
+        public string Detail
+        {
+            get => (string)GetValue(DetailProperty);
+            set => SetValue(DetailProperty, value);
+        }
+
+        public static readonly DependencyProperty UserSourceProperty =
+                DependencyProperty.Register(nameof(UserSource), typeof(string), typeof(DiscordRPPreview), new PropertyMetadata("../../Images/pixiBotLogo.png"));
+
+        public string UserSource
+        {
+            get => (string)GetValue(UserSourceProperty);
+            set => SetValue(UserSourceProperty, value);
+        }
+
+        public static readonly DependencyProperty IsPlayingProperty =
+                DependencyProperty.Register(nameof(IsPlaying), typeof(bool), typeof(DiscordRPPreview), new PropertyMetadata(true));
+
+        public bool IsPlaying
+        {
+            get => (bool)GetValue(IsPlayingProperty);
+            set
+            {
+                SetValue(IsPlayingProperty, value);
+            }
+        }
+
+        public DiscordRPPreview()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 1 - 1
PixiEditor/Views/UserControls/DrawingViewPort.xaml

@@ -30,7 +30,7 @@
                 </i:EventTrigger>
             </i:Interaction.Triggers>
             <i:Interaction.Behaviors>
-                <behaviors:MouseBehaviour RelativeTo="{Binding ElementName=DrawingPanel, Path=Item}"
+                <behaviors:MouseBehavior RelativeTo="{Binding ElementName=DrawingPanel, Path=Item}"
                                                   MouseX="{Binding MouseXOnCanvas, Mode=TwoWay, ElementName=uc}"
                                                   MouseY="{Binding MouseYOnCanvas, Mode=TwoWay, ElementName=uc}" />
             </i:Interaction.Behaviors>

+ 10 - 5
PixiEditor/Views/UserControls/EditableTextBlock.xaml

@@ -3,23 +3,28 @@
              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:converters="clr-namespace:PixiEditor.Helpers.Converters"
+             xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:behaviours="clr-namespace:PixiEditor.Helpers.Behaviours"
              mc:Ignorable="d"
              d:DesignHeight="60" d:DesignWidth="100">
     <UserControl.Resources>
         <converters:OppositeVisibilityConverter x:Key="OppositeVisibilityConverter" />
     </UserControl.Resources>
     <Grid>
-        <TextBlock Foreground="Snow" MouseDown="TextBlock_MouseDown"
+        <TextBlock Foreground="Snow" MouseLeftButtonDown="TextBlock_MouseDown"
+                   TextTrimming="CharacterEllipsis"
                    Visibility="{Binding Path=TextBlockVisibility, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"
                    Text="{Binding Path=Text, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}" />
         <TextBox Style="{StaticResource DarkTextBoxStyle}"
-                 LostFocus="TextBox_LostFocus"
+                 LostFocus="TextBox_LostFocus" 
                  Text="{Binding Path=Text, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"
-                 KeyDown="TextBox_KeyDown"
+                 KeyDown="TextBox_KeyDown"                 
                  LostKeyboardFocus="textBox_LostKeyboardFocus"
                  Visibility="{Binding Path=TextBlockVisibility, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, 
             Converter={StaticResource OppositeVisibilityConverter}}"
-                 Name="textBox" />
+                 Name="textBox">
+            <i:Interaction.Behaviors>
+                <behaviours:GlobalShortcutFocusBehavior/>
+            </i:Interaction.Behaviors>
+        </TextBox>
     </Grid>
 </UserControl>

+ 30 - 21
PixiEditor/Views/UserControls/EditableTextBlock.xaml.cs

@@ -7,19 +7,24 @@ using PixiEditor.Models.Controllers.Shortcuts;
 namespace PixiEditor.Views
 {
     /// <summary>
-    ///     Interaction logic for EditableTextBlock.xaml
+    ///     Interaction logic for EditableTextBlock.xaml.
     /// </summary>
     public partial class EditableTextBlock : UserControl
     {
         // Using a DependencyProperty as the backing store for TextBlockVisibility.  This enables animation, styling, binding, etc...
         public static readonly DependencyProperty TextBlockVisibilityProperty =
-            DependencyProperty.Register("TextBlockVisibility", typeof(Visibility), typeof(EditableTextBlock),
+            DependencyProperty.Register(
+                "TextBlockVisibility",
+                typeof(Visibility),
+                typeof(EditableTextBlock),
                 new PropertyMetadata(Visibility.Visible));
 
-
         // Using a DependencyProperty as the backing store for Text.  This enables animation, styling, binding, etc...
         public static readonly DependencyProperty TextProperty =
-            DependencyProperty.Register("Text", typeof(string), typeof(EditableTextBlock),
+            DependencyProperty.Register(
+                "Text",
+                typeof(string),
+                typeof(EditableTextBlock),
                 new PropertyMetadata(default(string)));
 
         // Using a DependencyProperty as the backing store for EnableEditing.  This enables animation, styling, binding, etc...
@@ -27,6 +32,7 @@ namespace PixiEditor.Views
             DependencyProperty.Register("IsEditing", typeof(bool), typeof(EditableTextBlock),
                 new PropertyMetadata(OnIsEditingChanged));
 
+
         public EditableTextBlock()
         {
             InitializeComponent();
@@ -34,33 +40,22 @@ namespace PixiEditor.Views
 
         public Visibility TextBlockVisibility
         {
-            get => (Visibility) GetValue(TextBlockVisibilityProperty);
+            get => (Visibility)GetValue(TextBlockVisibilityProperty);
             set => SetValue(TextBlockVisibilityProperty, value);
         }
 
-
         public bool IsEditing
         {
-            get => (bool) GetValue(EnableEditingProperty);
+            get => (bool)GetValue(EnableEditingProperty);
             set => SetValue(EnableEditingProperty, value);
         }
 
-
         public string Text
         {
-            get => (string) GetValue(TextProperty);
+            get => (string)GetValue(TextProperty);
             set => SetValue(TextProperty, value);
         }
 
-        private static void OnIsEditingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
-        {
-            if ((bool) e.NewValue)
-            {
-                EditableTextBlock tb = (EditableTextBlock) d;
-                tb.EnableEditing();
-            }
-        }
-
         public void EnableEditing()
         {
             ShortcutController.BlockShortcutExecution = true;
@@ -70,22 +65,36 @@ namespace PixiEditor.Views
             textBox.SelectAll();
         }
 
-        private void DisableEditing()
+        public void DisableEditing()
         {
             TextBlockVisibility = Visibility.Visible;
             ShortcutController.BlockShortcutExecution = false;
             IsEditing = false;
         }
 
+        private static void OnIsEditingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+        {
+            if ((bool)e.NewValue)
+            {
+                EditableTextBlock tb = (EditableTextBlock)d;
+                tb.EnableEditing();
+            }
+        }
 
         private void TextBlock_MouseDown(object sender, MouseButtonEventArgs e)
         {
-            if (e.ChangedButton == MouseButton.Left && e.ClickCount == 2) EnableEditing();
+            if (e.ClickCount == 2)
+            {
+                EnableEditing();
+            }
         }
 
         private void TextBox_KeyDown(object sender, KeyEventArgs e)
         {
-            if (e.Key == Key.Enter) DisableEditing();
+            if (e.Key == Key.Enter)
+            {
+                DisableEditing();
+            }
         }
 
         private void TextBox_LostFocus(object sender, RoutedEventArgs e)

+ 14 - 9
PixiEditor/Views/UserControls/LayerItem.xaml

@@ -6,12 +6,13 @@
              xmlns:local="clr-namespace:PixiEditor.Views"
              xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters"
              xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
-             mc:Ignorable="d" 
-             d:DesignHeight="60" d:DesignWidth="250" Name="uc" MouseLeave="LayerItem_OnMouseLeave" MouseEnter="LayerItem_OnMouseEnter">
+             mc:Ignorable="d" Focusable="True"
+             d:DesignHeight="60" d:DesignWidth="250" Name="uc"
+             MouseLeave="LayerItem_OnMouseLeave" MouseEnter="LayerItem_OnMouseEnter">
     <UserControl.Resources>
         <converters:BoolToColorConverter x:Key="BoolToColorConverter" />
     </UserControl.Resources>
-    <Border BorderThickness="1" BorderBrush="Gray" MinWidth="60"
+    <Border BorderThickness="0 0 0 0.5" BorderBrush="Gray" MinWidth="60"
             Background="{Binding IsActive, Mode=TwoWay, Converter={StaticResource BoolToColorConverter}}">
         <i:Interaction.Triggers>
             <i:EventTrigger EventName="MouseDown">
@@ -22,19 +23,23 @@
         </i:Interaction.Triggers>
         <Grid>
             <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="35"/>
+                <ColumnDefinition Width="30"/>
                 <ColumnDefinition Width="199*"/>
-                <ColumnDefinition Width="35"/>
+                <ColumnDefinition Width="20"/>
             </Grid.ColumnDefinitions>
             <CheckBox Style="{StaticResource ImageCheckBox}" VerticalAlignment="Center"
-                      IsThreeState="False" HorizontalAlignment="Center"
+                      IsThreeState="False" HorizontalAlignment="Center" 
                       IsChecked="{Binding Path=IsVisible, Mode=TwoWay}" Grid.Column="0" Height="16" />
-            <local:EditableTextBlock
-                    IsEditing="{Binding IsRenaming, ElementName=uc, Mode=TwoWay}" Grid.Column="1" FontSize="16" HorizontalAlignment="Center"
+            <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Left" Margin="5,0,0,0">
+                <Image Source="{Binding PreviewImage,ElementName=uc}" Stretch="Uniform" Width="50" Height="20" Margin="0,0,20,0"
+                       RenderOptions.BitmapScalingMode="NearestNeighbor"/>
+                <local:EditableTextBlock
+                    IsEditing="{Binding IsRenaming, ElementName=uc, Mode=TwoWay}" FontSize="16"
                     VerticalAlignment="Center"
                     Text="{Binding LayerName, ElementName=uc, Mode=TwoWay}" />
+            </StackPanel>
             <StackPanel Visibility="{Binding Path=ControlButtonsVisible, ElementName=uc}" 
-                        Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Width="15" 
+                        Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Width="11" 
                         Grid.Column="2">
                 <Button CommandParameter="{Binding LayerIndex, ElementName=uc}" Command="{Binding Path=MoveToFrontCommand, ElementName=uc}" Background="Transparent" Style="{StaticResource OpacityButtonStyle}" Foreground="White" HorizontalAlignment="Center" BorderThickness="0">
                     <TextBlock Text="&#9650;"/>

+ 13 - 5
PixiEditor/Views/UserControls/LayerItem.xaml.cs

@@ -47,7 +47,7 @@ namespace PixiEditor.Views
 
         public RelayCommand SetActiveLayerCommand
         {
-            get { return (RelayCommand) GetValue(SetActiveLayerCommandProperty); }
+            get { return (RelayCommand)GetValue(SetActiveLayerCommandProperty); }
             set { SetValue(SetActiveLayerCommandProperty, value); }
         }
 
@@ -72,13 +72,21 @@ namespace PixiEditor.Views
         public static readonly DependencyProperty ControlButtonsVisibleProperty = DependencyProperty.Register(
             "ControlButtonsVisible", typeof(Visibility), typeof(LayerItem), new PropertyMetadata(System.Windows.Visibility.Hidden));
 
-        public Visibility ControlButtonsVisible
+        public WriteableBitmap PreviewImage
         {
-            get { return (Visibility) GetValue(ControlButtonsVisibleProperty); }
-            set { SetValue(ControlButtonsVisibleProperty, value); }
+            get { return (WriteableBitmap)GetValue(PreviewImageProperty); }
+            set { SetValue(PreviewImageProperty, value); }
         }
 
+        // Using a DependencyProperty as the backing store for PreviewImage.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty PreviewImageProperty =
+            DependencyProperty.Register("PreviewImage", typeof(WriteableBitmap), typeof(LayerItem), new PropertyMetadata(null));
 
+        public Visibility ControlButtonsVisible
+        {
+            get { return (Visibility)GetValue(ControlButtonsVisibleProperty); }
+            set { SetValue(ControlButtonsVisibleProperty, value); }
+        }
 
         public RelayCommand MoveToBackCommand
         {
@@ -95,7 +103,7 @@ namespace PixiEditor.Views
 
         public RelayCommand MoveToFrontCommand
         {
-            get { return (RelayCommand) GetValue(MoveToFrontCommandProperty); }
+            get { return (RelayCommand)GetValue(MoveToFrontCommandProperty); }
             set { SetValue(MoveToFrontCommandProperty, value); }
         }
 

+ 9 - 9
PixiEditor/Views/UserControls/NumberInput.xaml

@@ -7,14 +7,14 @@
              xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
              xmlns:behaviours="clr-namespace:PixiEditor.Helpers.Behaviours"
              xmlns:ui="clr-namespace:PixiEditor.Helpers.UI"
-             mc:Ignorable="d"
+             mc:Ignorable="d" Focusable="True"
              d:DesignHeight="20" d:DesignWidth="40" x:Name="numberInput">
-    <Grid>
-        <TextBox TextAlignment="Center" Style="{StaticResource DarkTextBoxStyle}"
-                 PreviewTextInput="TextBox_PreviewTextInput" Text="{Binding ElementName=numberInput, Path=Value}">
-            <i:Interaction.Behaviors>
-                <behaviours:TextBoxFocusBehavior />
-            </i:Interaction.Behaviors>
-        </TextBox>
-    </Grid>
+    <TextBox TextAlignment="Center" Style="{StaticResource DarkTextBoxStyle}" Focusable="True"
+               
+             PreviewTextInput="TextBox_PreviewTextInput" Text="{Binding ElementName=numberInput, Path=Value, UpdateSourceTrigger=PropertyChanged}">
+        <i:Interaction.Behaviors>
+            <behaviours:TextBoxFocusBehavior/>
+            <behaviours:GlobalShortcutFocusBehavior/>
+        </i:Interaction.Behaviors>
+    </TextBox>
 </UserControl>

+ 16 - 7
PixiEditor/Views/UserControls/NumberInput.xaml.cs

@@ -3,6 +3,7 @@ using System.Text.RegularExpressions;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Input;
+using PixiEditor.Models.Controllers.Shortcuts;
 
 namespace PixiEditor.Views
 {
@@ -13,19 +14,29 @@ namespace PixiEditor.Views
     {
         // Using a DependencyProperty as the backing store for Value.  This enables animation, styling, binding, etc...
         public static readonly DependencyProperty ValueProperty =
-            DependencyProperty.Register("Value", typeof(float), typeof(NumberInput),
+            DependencyProperty.Register(
+                "Value",
+                typeof(float),
+                typeof(NumberInput),
                 new PropertyMetadata(0f, OnValueChanged));
 
         // Using a DependencyProperty as the backing store for Min.  This enables animation, styling, binding, etc...
         public static readonly DependencyProperty MinProperty =
-            DependencyProperty.Register("Min", typeof(float), typeof(NumberInput),
+            DependencyProperty.Register(
+                "Min",
+                typeof(float),
+                typeof(NumberInput),
                 new PropertyMetadata(float.NegativeInfinity));
 
         // Using a DependencyProperty as the backing store for Max.  This enables animation, styling, binding, etc...
         public static readonly DependencyProperty MaxProperty =
-            DependencyProperty.Register("Max", typeof(float), typeof(NumberInput),
+            DependencyProperty.Register(
+                "Max",
+                typeof(float),
+                typeof(NumberInput),
                 new PropertyMetadata(float.PositiveInfinity));
 
+        private Regex regex = new Regex("^[.][0-9]+$|^[0-9]*[.]{0,1}[0-9]*$");
 
         public NumberInput()
         {
@@ -44,7 +55,6 @@ namespace PixiEditor.Views
             set => SetValue(MinProperty, value);
         }
 
-
         public float Max
         {
             get => (float)GetValue(MaxProperty);
@@ -53,13 +63,12 @@ namespace PixiEditor.Views
 
         private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
         {
-            NumberInput input = (NumberInput) d;
-            input.Value = Math.Clamp((float) e.NewValue, input.Min, input.Max);
+            NumberInput input = (NumberInput)d;
+            input.Value = Math.Clamp((float)e.NewValue, input.Min, input.Max);
         }
 
         private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e)
         {
-            Regex regex = new Regex("^[.][0-9]+$|^[0-9]*[.]{0,1}[0-9]*$");
             e.Handled = !regex.IsMatch((sender as TextBox).Text.Insert((sender as TextBox).SelectionStart, e.Text));
         }
     }

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

@@ -3,7 +3,6 @@
              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:local="clr-namespace:PixiEditor.Views"
              xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
              xmlns:behaviors="clr-namespace:PixiEditor.Helpers.Behaviours"
              xmlns:converters="clr-namespace:PixiEditor.Helpers"
@@ -14,7 +13,7 @@
         <converters:ToolSizeToIntConverter x:Key="ToolSizeToIntConverter" />
     </UserControl.Resources>
     <TextBox IsEnabled="{Binding IsEnabled, ElementName=uc}" HorizontalContentAlignment="Center"
-             Style="{StaticResource DarkTextBoxStyle}" FontSize="16" MaxLength="4">
+             Style="{StaticResource DarkTextBoxStyle}" MaxLength="4">
         <TextBox.Text>
             <Binding ElementName="uc"
                      Path="Size" Mode="TwoWay"
@@ -25,6 +24,7 @@
             </Binding>
         </TextBox.Text>
         <i:Interaction.Behaviors>
+            <behaviors:GlobalShortcutFocusBehavior/>
             <behaviors:TextBoxFocusBehavior FillSize="True" />
         </i:Interaction.Behaviors>
     </TextBox>

+ 2 - 0
PixiEditor/Views/UserControls/SizePicker.xaml

@@ -15,6 +15,7 @@
                              AspectRatioValue="{Binding Path=ChosenHeight, ElementName=uc}"
                              AspectRatioControl="{Binding ElementName=HeightPicker}"
                              HorizontalAlignment="Left" Margin="10,0,0,0"
+                             FontSize="16"
                              Size="{Binding Path=ChosenWidth, ElementName=uc, Mode=TwoWay}" />
         </DockPanel>
         <DockPanel Margin="5,10,0,0" HorizontalAlignment="Center" VerticalAlignment="Center">
@@ -25,6 +26,7 @@
                              AspectRatioValue="{Binding Path=ChosenWidth, ElementName=uc}"
                              AspectRatioControl="{Binding ElementName=WidthPicker}"
                              HorizontalAlignment="Left" Width="150" Height="30"
+                             FontSize="16"
                              Size="{Binding ChosenHeight, ElementName=uc, Mode=TwoWay}" />
         </DockPanel>
         <CheckBox Name="aspectRatio" Content="Preserve aspect ratio" Foreground="White" HorizontalAlignment="Left"

+ 16 - 0
PixiEditor/Views/UserControls/ToolSettingColorPicker.xaml

@@ -0,0 +1,16 @@
+<UserControl x:Class="PixiEditor.Views.ToolSettingColorPicker"
+             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:local="clr-namespace:PixiEditor.Views.UserControls" xmlns:colorpicker="clr-namespace:ColorPicker;assembly=ColorPicker"
+             mc:Ignorable="d" 
+             x:Name="uc"
+             d:Background="{StaticResource AccentColor}">
+    <Grid>
+        <StackPanel Orientation="Horizontal">
+            <colorpicker:PortableColorPicker x:Name="ColorPicker" SelectedColor="{Binding SelectedColor, ElementName=uc}"/>
+            <Button Command="{Binding CopyMainColorCommand, ElementName=uc}" Style="{StaticResource DarkRoundButton}" FontSize="12" Width="100" Margin="5,0,0,0">Copy Main Color</Button>
+        </StackPanel>
+    </Grid>
+</UserControl>

+ 50 - 0
PixiEditor/Views/UserControls/ToolSettingColorPicker.xaml.cs

@@ -0,0 +1,50 @@
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Media;
+using ColorPicker;
+using PixiEditor.Helpers;
+using PixiEditor.ViewModels;
+
+namespace PixiEditor.Views
+{
+    /// <summary>
+    /// Interaction logic for ToolSettingColorPicker.xaml.
+    /// </summary>
+    public partial class ToolSettingColorPicker : UserControl
+    {
+        public static readonly DependencyProperty SelectedColorProperty =
+            DependencyProperty.Register(nameof(SelectedColor), typeof(Color), typeof(ToolSettingColorPicker));
+
+        public Color SelectedColor
+        {
+            get => (Color)GetValue(SelectedColorProperty);
+            set
+            {
+                SetValue(SelectedColorProperty, value);
+            }
+        }
+
+        public static readonly DependencyProperty CopyMainColorCommandProperty = DependencyProperty.Register(
+            nameof(CopyMainColorCommand), typeof(RelayCommand), typeof(ToolSettingColorPicker));
+
+        public RelayCommand CopyMainColorCommand
+        {
+            get { return (RelayCommand)GetValue(CopyMainColorCommandProperty); }
+            set { SetValue(CopyMainColorCommandProperty, value); }
+        }
+
+        public ToolSettingColorPicker()
+        {
+            InitializeComponent();
+            ColorPicker.SecondaryColor = Colors.Black;
+
+            CopyMainColorCommand = new RelayCommand(CopyMainColor);
+        }
+
+        public void CopyMainColor(object parameter)
+        {
+            SelectedColor = ViewModelMain.Current.ColorsSubViewModel.PrimaryColor;
+        }
+    }
+}

+ 4 - 4
PixiEditorTests/PixiEditorTests.csproj

@@ -18,13 +18,13 @@
   </ItemGroup>
 
   <ItemGroup>
-    <PackageReference Include="Codecov" Version="1.12.3" />
-    <PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1">
+    <PackageReference Include="Codecov" Version="1.12.4" />
+    <PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.2">
       <PrivateAssets>all</PrivateAssets>
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
     </PackageReference>
-    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
-    <PackageReference Include="Moq" Version="4.15.2" />
+    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
+    <PackageReference Include="Moq" Version="4.16.0" />
     <PackageReference Include="OpenCover" Version="4.7.922" />
     <PackageReference Include="xunit" Version="2.4.1" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">

+ 14 - 0
README.md

@@ -43,6 +43,16 @@ Follow these instructions to get PixiEditor working on your machine.
 3. Follow installer instructions
 
 
+## Featured content
+
+### PixiEditor 0.1.4 Trailer
+
+[![Trailer](https://img.youtube.com/vi/QKnXBUY0Pqk/0.jpg)](https://www.youtube.com/watch?v=QKnXBUY0Pqk)
+
+### Pixel Art Timelapse - "Bog Landscape" | PixiEditor
+
+[![Landscape timelapse](https://img.youtube.com/vi/bzC-wy6HCB8/0.jpg)](https://www.youtube.com/watch?v=bzC-wy6HCB8)
+
 
 ## Support
 
@@ -79,6 +89,10 @@ Please read [CONTRIBUTING.md](https://github.com/flabbet/PixiEditor/blob/master/
 
 You can find [FAQ here](https://github.com/PixiEditor/PixiEditor/wiki/FAQ).
 
+## Gallery
+
+Check out some pixel arts made with PixiEditor [here](https://github.com/PixiEditor/PixiEditor/wiki/Gallery).
+
 ## License
 
 This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/flabbet/PixiEditor/blob/master/LICENSE) - file for details

BIN
Screenshot.png


+ 1 - 1
windows-x64-release.yml

@@ -79,7 +79,7 @@ steps:
   displayName: "Compile installer"
   inputs:
     targetType: 'inline'
-    script: '& "$env:userprofile\.nuget\packages\tools.innosetup\6.0.5\tools\ISCC.exe" Installer\installer-setup-x64-light.iss'
+    script: '& "$env:userprofile\.nuget\packages\tools.innosetup\6.1.2\tools\ISCC.exe" Installer\installer-setup-x64-light.iss'
 
 - task: PublishPipelineArtifact@1
   displayName: "Publish artifact"

+ 1 - 1
windows-x86-release.yml

@@ -79,7 +79,7 @@ steps:
   displayName: "Compile installer"
   inputs:
     targetType: 'inline'
-    script: '& "$env:userprofile\.nuget\packages\tools.innosetup\6.0.5\tools\ISCC.exe" Installer\installer-setup-x86-light.iss'
+    script: '& "$env:userprofile\.nuget\packages\tools.innosetup\6.1.2\tools\ISCC.exe" Installer\installer-setup-x86-light.iss'
 
 - task: PublishPipelineArtifact@1
   displayName: "Publish artifact"