From 4c5b28287fcbf1f0bf869583264d6e7babcafada Mon Sep 17 00:00:00 2001 From: Dirkster99 Date: Fri, 3 May 2019 21:10:14 +0200 Subject: [PATCH 1/4] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 471fa120..b456dd31 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,8 @@ to also theme standard elements, such as, button and textblock etc. - (thanx to [madenaras](https://github.com/madenaras)) - @Dirkster99 +4) Added zh-Hant localization (thanx to [nuthrash](https://github.com/nuthrash) + ### Fixed Crash on IsSelected Document Property - #1481 - @Dirkster99 From 9d59cc764b7d8164aa9ba5a9c25dc7a68d36069a Mon Sep 17 00:00:00 2001 From: Dirkster99 Date: Sat, 4 May 2019 11:45:08 +0200 Subject: [PATCH 2/4] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b456dd31..b502447c 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ to also theme standard elements, such as, button and textblock etc. - (thanx to [madenaras](https://github.com/madenaras)) - @Dirkster99 -4) Added zh-Hant localization (thanx to [nuthrash](https://github.com/nuthrash) +4) Added [zh-Hant](https://github.com/Dirkster99/AvalonDock/wiki/Localization) localization (thanx to [nuthrash](https://github.com/nuthrash) ### Fixed Crash on IsSelected Document Property - #1481 @@ -146,6 +146,7 @@ Also Increased to Version 3.5.2. - @Dirkster99 ### Added resource file for AvalonDock for nl-BE +- [nl-BE](https://github.com/Dirkster99/AvalonDock/wiki/Localization) - #1424 - @Dirkster99 From f4356284444c0df8f3cb0761873ade1d95245093 Mon Sep 17 00:00:00 2001 From: Dirkster99 Date: Tue, 7 May 2019 18:22:58 +0200 Subject: [PATCH 3/4] Added 3 tool windows for testing in MLibTest --- .../MLibTest/Demos/PanesTemplateSelector.cs | 9 + .../{ => Tools}/ColorPickerViewModel.cs | 4 +- .../{AD => Tools}/FileStatsViewModel.cs | 3 +- .../Demos/ViewModels/Tools/Tool1_ViewModel.cs | 184 ++++++++++++++++++ .../Demos/ViewModels/Tools/Tool2_ViewModel.cs | 184 ++++++++++++++++++ .../Demos/ViewModels/Tools/Tool3_ViewModel.cs | 184 ++++++++++++++++++ .../Demos/ViewModels/WorkSpaceViewModel.cs | 48 ++++- source/MLibTest/MLibTest/MLibTest.csproj | 7 +- source/MLibTest/MLibTest/MainWindow.xaml | 12 ++ 9 files changed, 629 insertions(+), 6 deletions(-) rename source/MLibTest/MLibTest/Demos/ViewModels/{ => Tools}/ColorPickerViewModel.cs (99%) rename source/MLibTest/MLibTest/Demos/ViewModels/{AD => Tools}/FileStatsViewModel.cs (98%) create mode 100644 source/MLibTest/MLibTest/Demos/ViewModels/Tools/Tool1_ViewModel.cs create mode 100644 source/MLibTest/MLibTest/Demos/ViewModels/Tools/Tool2_ViewModel.cs create mode 100644 source/MLibTest/MLibTest/Demos/ViewModels/Tools/Tool3_ViewModel.cs diff --git a/source/MLibTest/MLibTest/Demos/PanesTemplateSelector.cs b/source/MLibTest/MLibTest/Demos/PanesTemplateSelector.cs index 3480fba8..ddfe94bc 100644 --- a/source/MLibTest/MLibTest/Demos/PanesTemplateSelector.cs +++ b/source/MLibTest/MLibTest/Demos/PanesTemplateSelector.cs @@ -4,6 +4,7 @@ using System.Windows; using Xceed.Wpf.AvalonDock.Layout; using AvalonDock.MVVMTestApp; + using AvalonDock.Tools; /// /// Implements a for AvalonDock's documents and toolwindows. @@ -35,6 +36,11 @@ public PanesTemplateSelector() /// public DataTemplate ColorPickerViewTemplate { get; set; } + /// + /// Gets a template for simple testing tool windows. + /// + public DataTemplate Tooln_ViewTemplate { get; set; } + /// /// Determines the matching view for a specific given type of viewmodel. /// @@ -54,6 +60,9 @@ public override System.Windows.DataTemplate SelectTemplate(object item, if (item is ColorPickerViewModel) return ColorPickerViewTemplate; + if (item is Tool1_ViewModel || item is Tool2_ViewModel || item is Tool3_ViewModel) + return Tooln_ViewTemplate; + return base.SelectTemplate(item, container); } } diff --git a/source/MLibTest/MLibTest/Demos/ViewModels/ColorPickerViewModel.cs b/source/MLibTest/MLibTest/Demos/ViewModels/Tools/ColorPickerViewModel.cs similarity index 99% rename from source/MLibTest/MLibTest/Demos/ViewModels/ColorPickerViewModel.cs rename to source/MLibTest/MLibTest/Demos/ViewModels/Tools/ColorPickerViewModel.cs index 096b6360..580db7e7 100644 --- a/source/MLibTest/MLibTest/Demos/ViewModels/ColorPickerViewModel.cs +++ b/source/MLibTest/MLibTest/Demos/ViewModels/Tools/ColorPickerViewModel.cs @@ -1,4 +1,4 @@ -namespace AvalonDock.MVVMTestApp +namespace AvalonDock.Tools { using MLibTest.Demos.ViewModels.Interfaces; using System; @@ -7,8 +7,8 @@ using System.Windows.Input; using MLibTest.ViewModels.Base; using MLib.Interfaces; - using System.Windows; using Settings.Interfaces; + using AvalonDock.MVVMTestApp; /// /// Implements the viewmodel that drives the view a Color Picker tool window. diff --git a/source/MLibTest/MLibTest/Demos/ViewModels/AD/FileStatsViewModel.cs b/source/MLibTest/MLibTest/Demos/ViewModels/Tools/FileStatsViewModel.cs similarity index 98% rename from source/MLibTest/MLibTest/Demos/ViewModels/AD/FileStatsViewModel.cs rename to source/MLibTest/MLibTest/Demos/ViewModels/Tools/FileStatsViewModel.cs index 28596f35..4c9f2fca 100644 --- a/source/MLibTest/MLibTest/Demos/ViewModels/AD/FileStatsViewModel.cs +++ b/source/MLibTest/MLibTest/Demos/ViewModels/Tools/FileStatsViewModel.cs @@ -1,5 +1,6 @@ -namespace AvalonDock.MVVMTestApp +namespace AvalonDock.Tools { + using AvalonDock.MVVMTestApp; using MLibTest.Demos.ViewModels.Interfaces; using System; using System.IO; diff --git a/source/MLibTest/MLibTest/Demos/ViewModels/Tools/Tool1_ViewModel.cs b/source/MLibTest/MLibTest/Demos/ViewModels/Tools/Tool1_ViewModel.cs new file mode 100644 index 00000000..b1cc29da --- /dev/null +++ b/source/MLibTest/MLibTest/Demos/ViewModels/Tools/Tool1_ViewModel.cs @@ -0,0 +1,184 @@ +namespace AvalonDock.Tools +{ + using MLibTest.Demos.ViewModels.Interfaces; + using System; + using System.Windows.Media.Imaging; + using System.Windows.Media; + using System.Windows.Input; + using MLibTest.ViewModels.Base; + using MLib.Interfaces; + using Settings.Interfaces; + using AvalonDock.MVVMTestApp; + + /// + /// Implements the viewmodel that drives a sample tool window view. + /// + internal class Tool1_ViewModel : ToolViewModel + { + #region fields + /// + /// Identifies the of this tool window. + /// + public const string ToolContentId = "Tool1_Tool"; + + /// + /// Identifies the caption string used for this tool window. + /// + public const string ToolTitle = "Tool 1"; + + private IWorkSpaceViewModel _workSpaceViewModel = null; + + private Color _SelectedBackgroundColor; + private Color _SelectedAccentColor; + private ICommand _ResetAccentColorCommand; + #endregion fields + + #region constructors + /// + /// Class constructor + /// + /// Is the link to the application's viewmodel + /// to enable (event based) communication between this viewmodel and the application. + public Tool1_ViewModel(IWorkSpaceViewModel workSpaceViewModel) + : base(ToolTitle) + { + _workSpaceViewModel = workSpaceViewModel; + + SetupADToolDefaults(); + SetupToolDefaults(); + } + + /// + /// Hidden default class constructor + /// + protected Tool1_ViewModel() + : base(ToolTitle) + { + SetupADToolDefaults(); + SetupToolDefaults(); + } + #endregion constructors + + #region properties + /// + /// Gets/sets the currently selected accent color for the color picker in the tool window's view. + /// + public Color SelectedBackgroundColor + { + get { return _SelectedBackgroundColor; } + set + { + if (_SelectedBackgroundColor != value) + { + _SelectedBackgroundColor = value; + RaisePropertyChanged(() => SelectedBackgroundColor); + } + } + } + + /// + /// Gets/sets the currently selected accent color for the color picker in the tool window's view. + /// + public Color SelectedAccentColor + { + get { return _SelectedAccentColor; } + set + { + if (_SelectedAccentColor != value) + { + _SelectedAccentColor = value; + RaisePropertyChanged(() => SelectedAccentColor); + } + } + } + + /// + /// Gets a command to reset the currently selected accent color + /// and reloads all current resources to make sure that the + /// accent is changed consistently. + /// + public ICommand ResetAccentColorCommand + { + get + { + if (_ResetAccentColorCommand == null) + { + _ResetAccentColorCommand = new RelayCommand((p) => + { + if ((p is Color) == false) + return; + + Color accentColor = (Color)p; + + var appearance = GetService(); + var settings = GetService(); // add the default themes + + // 1) You could use this if you where using MLib only + // appearance.SetAccentColor(accentColor); + + // 2) But you should use this if you use MLib with additional libraries + // with additional accent colors to be synchronized at run-time + appearance.SetTheme(settings.Themes + , appearance.ThemeName + , accentColor); + + // 3 You could also use something like this to change accent color + // If you were using your own Theming Framework or MUI, Mahapps etc + // +//// Application.Current.Resources[MWindowLib.Themes.ResourceKeys.ControlAccentColorKey] = accentColor; +//// Application.Current.Resources[MWindowLib.Themes.ResourceKeys.ControlAccentBrushKey] = new SolidColorBrush(accentColor); +//// +//// Application.Current.Resources[MLib.Themes.ResourceKeys.ControlAccentColorKey] = accentColor; +//// Application.Current.Resources[MLib.Themes.ResourceKeys.ControlAccentBrushKey] = new SolidColorBrush(accentColor); +//// +//// Application.Current.Resources[Xceed.Wpf.AvalonDock.Themes.VS2013.Themes.ResourceKeys.ControlAccentColorKey] = accentColor; +//// Application.Current.Resources[Xceed.Wpf.AvalonDock.Themes.VS2013.Themes.ResourceKeys.ControlAccentBrushKey] = new SolidColorBrush(accentColor); +//// +//// Application.Current.Resources[NumericUpDownLib.Themes.ResourceKeys.ControlAccentColorKey] = accentColor; +//// Application.Current.Resources[NumericUpDownLib.Themes.ResourceKeys.ControlAccentBrushKey] = new SolidColorBrush(accentColor); + + }); + } + + return _ResetAccentColorCommand; + } + } + + /// + /// Gets a human readable description for the property. + /// + public string SelectedAccentColorDescription + { + get + { + return "Define a custom color."; + } + } + #endregion properties + + #region methods + /// + /// Initialize Avalondock specific defaults that are specific to this tool window. + /// + private void SetupADToolDefaults() + { + ContentId = ToolContentId; // Define a unique contentid for this toolwindow + + BitmapImage bi = new BitmapImage(); // Define an icon for this toolwindow + bi.BeginInit(); + bi.UriSource = new Uri("pack://application:,,/Demos/Images/property-blue.png"); + bi.EndInit(); + IconSource = bi; + } + + /// + /// Initialize non-Avalondock defaults that are specific to this tool window. + /// + private void SetupToolDefaults() + { + SelectedBackgroundColor = Color.FromArgb(255, 0, 0, 0); + SelectedAccentColor = Color.FromArgb(128, 0, 180, 0); + } + #endregion methods + } +} diff --git a/source/MLibTest/MLibTest/Demos/ViewModels/Tools/Tool2_ViewModel.cs b/source/MLibTest/MLibTest/Demos/ViewModels/Tools/Tool2_ViewModel.cs new file mode 100644 index 00000000..09e1e1d8 --- /dev/null +++ b/source/MLibTest/MLibTest/Demos/ViewModels/Tools/Tool2_ViewModel.cs @@ -0,0 +1,184 @@ +namespace AvalonDock.Tools +{ + using MLibTest.Demos.ViewModels.Interfaces; + using System; + using System.Windows.Media.Imaging; + using System.Windows.Media; + using System.Windows.Input; + using MLibTest.ViewModels.Base; + using MLib.Interfaces; + using Settings.Interfaces; + using AvalonDock.MVVMTestApp; + + /// + /// Implements the viewmodel that drives a sample tool window view. + /// + internal class Tool2_ViewModel : ToolViewModel + { + #region fields + /// + /// Identifies the of this tool window. + /// + public const string ToolContentId = "Tool2_Tool"; + + /// + /// Identifies the caption string used for this tool window. + /// + public const string ToolTitle = "Tool 2"; + + private IWorkSpaceViewModel _workSpaceViewModel = null; + + private Color _SelectedBackgroundColor; + private Color _SelectedAccentColor; + private ICommand _ResetAccentColorCommand; + #endregion fields + + #region constructors + /// + /// Class constructor + /// + /// Is the link to the application's viewmodel + /// to enable (event based) communication between this viewmodel and the application. + public Tool2_ViewModel(IWorkSpaceViewModel workSpaceViewModel) + : base(ToolTitle) + { + _workSpaceViewModel = workSpaceViewModel; + + SetupADToolDefaults(); + SetupToolDefaults(); + } + + /// + /// Hidden default class constructor + /// + protected Tool2_ViewModel() + : base(ToolTitle) + { + SetupADToolDefaults(); + SetupToolDefaults(); + } + #endregion constructors + + #region properties + /// + /// Gets/sets the currently selected accent color for the color picker in the tool window's view. + /// + public Color SelectedBackgroundColor + { + get { return _SelectedBackgroundColor; } + set + { + if (_SelectedBackgroundColor != value) + { + _SelectedBackgroundColor = value; + RaisePropertyChanged(() => SelectedBackgroundColor); + } + } + } + + /// + /// Gets/sets the currently selected accent color for the color picker in the tool window's view. + /// + public Color SelectedAccentColor + { + get { return _SelectedAccentColor; } + set + { + if (_SelectedAccentColor != value) + { + _SelectedAccentColor = value; + RaisePropertyChanged(() => SelectedAccentColor); + } + } + } + + /// + /// Gets a command to reset the currently selected accent color + /// and reloads all current resources to make sure that the + /// accent is changed consistently. + /// + public ICommand ResetAccentColorCommand + { + get + { + if (_ResetAccentColorCommand == null) + { + _ResetAccentColorCommand = new RelayCommand((p) => + { + if ((p is Color) == false) + return; + + Color accentColor = (Color)p; + + var appearance = GetService(); + var settings = GetService(); // add the default themes + + // 1) You could use this if you where using MLib only + // appearance.SetAccentColor(accentColor); + + // 2) But you should use this if you use MLib with additional libraries + // with additional accent colors to be synchronized at run-time + appearance.SetTheme(settings.Themes + , appearance.ThemeName + , accentColor); + + // 3 You could also use something like this to change accent color + // If you were using your own Theming Framework or MUI, Mahapps etc + // +//// Application.Current.Resources[MWindowLib.Themes.ResourceKeys.ControlAccentColorKey] = accentColor; +//// Application.Current.Resources[MWindowLib.Themes.ResourceKeys.ControlAccentBrushKey] = new SolidColorBrush(accentColor); +//// +//// Application.Current.Resources[MLib.Themes.ResourceKeys.ControlAccentColorKey] = accentColor; +//// Application.Current.Resources[MLib.Themes.ResourceKeys.ControlAccentBrushKey] = new SolidColorBrush(accentColor); +//// +//// Application.Current.Resources[Xceed.Wpf.AvalonDock.Themes.VS2013.Themes.ResourceKeys.ControlAccentColorKey] = accentColor; +//// Application.Current.Resources[Xceed.Wpf.AvalonDock.Themes.VS2013.Themes.ResourceKeys.ControlAccentBrushKey] = new SolidColorBrush(accentColor); +//// +//// Application.Current.Resources[NumericUpDownLib.Themes.ResourceKeys.ControlAccentColorKey] = accentColor; +//// Application.Current.Resources[NumericUpDownLib.Themes.ResourceKeys.ControlAccentBrushKey] = new SolidColorBrush(accentColor); + + }); + } + + return _ResetAccentColorCommand; + } + } + + /// + /// Gets a human readable description for the property. + /// + public string SelectedAccentColorDescription + { + get + { + return "Define a custom color."; + } + } + #endregion properties + + #region methods + /// + /// Initialize Avalondock specific defaults that are specific to this tool window. + /// + private void SetupADToolDefaults() + { + ContentId = ToolContentId; // Define a unique contentid for this toolwindow + + BitmapImage bi = new BitmapImage(); // Define an icon for this toolwindow + bi.BeginInit(); + bi.UriSource = new Uri("pack://application:,,/Demos/Images/property-blue.png"); + bi.EndInit(); + IconSource = bi; + } + + /// + /// Initialize non-Avalondock defaults that are specific to this tool window. + /// + private void SetupToolDefaults() + { + SelectedBackgroundColor = Color.FromArgb(255, 0, 0, 0); + SelectedAccentColor = Color.FromArgb(128, 0, 180, 0); + } + #endregion methods + } +} diff --git a/source/MLibTest/MLibTest/Demos/ViewModels/Tools/Tool3_ViewModel.cs b/source/MLibTest/MLibTest/Demos/ViewModels/Tools/Tool3_ViewModel.cs new file mode 100644 index 00000000..57f3f245 --- /dev/null +++ b/source/MLibTest/MLibTest/Demos/ViewModels/Tools/Tool3_ViewModel.cs @@ -0,0 +1,184 @@ +namespace AvalonDock.Tools +{ + using MLibTest.Demos.ViewModels.Interfaces; + using System; + using System.Windows.Media.Imaging; + using System.Windows.Media; + using System.Windows.Input; + using MLibTest.ViewModels.Base; + using MLib.Interfaces; + using Settings.Interfaces; + using AvalonDock.MVVMTestApp; + + /// + /// Implements the viewmodel that drives a sample tool window view. + /// + internal class Tool3_ViewModel : ToolViewModel + { + #region fields + /// + /// Identifies the of this tool window. + /// + public const string ToolContentId = "Tool3_Tool"; + + /// + /// Identifies the caption string used for this tool window. + /// + public const string ToolTitle = "Tool 3"; + + private IWorkSpaceViewModel _workSpaceViewModel = null; + + private Color _SelectedBackgroundColor; + private Color _SelectedAccentColor; + private ICommand _ResetAccentColorCommand; + #endregion fields + + #region constructors + /// + /// Class constructor + /// + /// Is the link to the application's viewmodel + /// to enable (event based) communication between this viewmodel and the application. + public Tool3_ViewModel(IWorkSpaceViewModel workSpaceViewModel) + : base(ToolTitle) + { + _workSpaceViewModel = workSpaceViewModel; + + SetupADToolDefaults(); + SetupToolDefaults(); + } + + /// + /// Hidden default class constructor + /// + protected Tool3_ViewModel() + : base(ToolTitle) + { + SetupADToolDefaults(); + SetupToolDefaults(); + } + #endregion constructors + + #region properties + /// + /// Gets/sets the currently selected accent color for the color picker in the tool window's view. + /// + public Color SelectedBackgroundColor + { + get { return _SelectedBackgroundColor; } + set + { + if (_SelectedBackgroundColor != value) + { + _SelectedBackgroundColor = value; + RaisePropertyChanged(() => SelectedBackgroundColor); + } + } + } + + /// + /// Gets/sets the currently selected accent color for the color picker in the tool window's view. + /// + public Color SelectedAccentColor + { + get { return _SelectedAccentColor; } + set + { + if (_SelectedAccentColor != value) + { + _SelectedAccentColor = value; + RaisePropertyChanged(() => SelectedAccentColor); + } + } + } + + /// + /// Gets a command to reset the currently selected accent color + /// and reloads all current resources to make sure that the + /// accent is changed consistently. + /// + public ICommand ResetAccentColorCommand + { + get + { + if (_ResetAccentColorCommand == null) + { + _ResetAccentColorCommand = new RelayCommand((p) => + { + if ((p is Color) == false) + return; + + Color accentColor = (Color)p; + + var appearance = GetService(); + var settings = GetService(); // add the default themes + + // 1) You could use this if you where using MLib only + // appearance.SetAccentColor(accentColor); + + // 2) But you should use this if you use MLib with additional libraries + // with additional accent colors to be synchronized at run-time + appearance.SetTheme(settings.Themes + , appearance.ThemeName + , accentColor); + + // 3 You could also use something like this to change accent color + // If you were using your own Theming Framework or MUI, Mahapps etc + // +//// Application.Current.Resources[MWindowLib.Themes.ResourceKeys.ControlAccentColorKey] = accentColor; +//// Application.Current.Resources[MWindowLib.Themes.ResourceKeys.ControlAccentBrushKey] = new SolidColorBrush(accentColor); +//// +//// Application.Current.Resources[MLib.Themes.ResourceKeys.ControlAccentColorKey] = accentColor; +//// Application.Current.Resources[MLib.Themes.ResourceKeys.ControlAccentBrushKey] = new SolidColorBrush(accentColor); +//// +//// Application.Current.Resources[Xceed.Wpf.AvalonDock.Themes.VS2013.Themes.ResourceKeys.ControlAccentColorKey] = accentColor; +//// Application.Current.Resources[Xceed.Wpf.AvalonDock.Themes.VS2013.Themes.ResourceKeys.ControlAccentBrushKey] = new SolidColorBrush(accentColor); +//// +//// Application.Current.Resources[NumericUpDownLib.Themes.ResourceKeys.ControlAccentColorKey] = accentColor; +//// Application.Current.Resources[NumericUpDownLib.Themes.ResourceKeys.ControlAccentBrushKey] = new SolidColorBrush(accentColor); + + }); + } + + return _ResetAccentColorCommand; + } + } + + /// + /// Gets a human readable description for the property. + /// + public string SelectedAccentColorDescription + { + get + { + return "Define a custom color."; + } + } + #endregion properties + + #region methods + /// + /// Initialize Avalondock specific defaults that are specific to this tool window. + /// + private void SetupADToolDefaults() + { + ContentId = ToolContentId; // Define a unique contentid for this toolwindow + + BitmapImage bi = new BitmapImage(); // Define an icon for this toolwindow + bi.BeginInit(); + bi.UriSource = new Uri("pack://application:,,/Demos/Images/property-blue.png"); + bi.EndInit(); + IconSource = bi; + } + + /// + /// Initialize non-Avalondock defaults that are specific to this tool window. + /// + private void SetupToolDefaults() + { + SelectedBackgroundColor = Color.FromArgb(255, 0, 0, 0); + SelectedAccentColor = Color.FromArgb(128, 0, 180, 0); + } + #endregion methods + } +} diff --git a/source/MLibTest/MLibTest/Demos/ViewModels/WorkSpaceViewModel.cs b/source/MLibTest/MLibTest/Demos/ViewModels/WorkSpaceViewModel.cs index 7e0fb191..9f0d8575 100644 --- a/source/MLibTest/MLibTest/Demos/ViewModels/WorkSpaceViewModel.cs +++ b/source/MLibTest/MLibTest/Demos/ViewModels/WorkSpaceViewModel.cs @@ -1,6 +1,7 @@ namespace MLibTest.Demos.ViewModels { using AvalonDock.MVVMTestApp; + using AvalonDock.Tools; using Microsoft.Win32; using MLibTest.Demos.ViewModels.Interfaces; using MLibTest.ViewModels.Base; @@ -100,6 +101,9 @@ internal class WorkSpaceViewModel : MLibTest.ViewModels.Base.ViewModelBase, IWor private FileStatsViewModel _fileStats = null; private ColorPickerViewModel _ColorPicker = null; + private Tool1_ViewModel _Tool1; + private Tool2_ViewModel _Tool2; + private Tool3_ViewModel _Tool3; private FileViewModel _activeDocument = null; #endregion private fields @@ -163,7 +167,7 @@ public IEnumerable Tools get { if (_tools == null) - _tools = new ToolViewModel[] { FileStats, ColorPicker }; + _tools = new ToolViewModel[] { FileStats, ColorPicker, Tool1, Tool2, Tool3 }; return _tools; } } @@ -196,6 +200,48 @@ public ColorPickerViewModel ColorPicker } } + /// + /// Gets an instance of the tool1 tool window viewmodel. + /// + public Tool1_ViewModel Tool1 + { + get + { + if (_Tool1 == null) + _Tool1 = new Tool1_ViewModel(this as IWorkSpaceViewModel); + + return _Tool1; + } + } + + /// + /// Gets an instance of the tool2 tool window viewmodel. + /// + public Tool2_ViewModel Tool2 + { + get + { + if (_Tool2 == null) + _Tool2 = new Tool2_ViewModel(this as IWorkSpaceViewModel); + + return _Tool2; + } + } + + /// + /// Gets an instance of the tool3 tool window viewmodel. + /// + public Tool3_ViewModel Tool3 + { + get + { + if (_Tool3 == null) + _Tool3 = new Tool3_ViewModel(this as IWorkSpaceViewModel); + + return _Tool3; + } + } + /// /// Gets a open document command to open files from the file system. /// diff --git a/source/MLibTest/MLibTest/MLibTest.csproj b/source/MLibTest/MLibTest/MLibTest.csproj index 02019a38..59d9e339 100644 --- a/source/MLibTest/MLibTest/MLibTest.csproj +++ b/source/MLibTest/MLibTest/MLibTest.csproj @@ -81,12 +81,15 @@ - - + + + + + ColorSelectionView.xaml diff --git a/source/MLibTest/MLibTest/MainWindow.xaml b/source/MLibTest/MLibTest/MainWindow.xaml index 8a17a304..77faea7f 100644 --- a/source/MLibTest/MLibTest/MainWindow.xaml +++ b/source/MLibTest/MLibTest/MainWindow.xaml @@ -67,6 +67,9 @@ + + + @@ -107,6 +110,15 @@ + + + + + + + + + From 09967524785c43ed00fdf03b2b323b25116472bc Mon Sep 17 00:00:00 2001 From: Dirkster99 Date: Wed, 8 May 2019 18:42:40 +0200 Subject: [PATCH 4/4] Update README.md --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index b502447c..1f050a25 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,7 @@ Support this project with a :star: -report an issue, or even better, place a pull request :mailbox: :blush: -My projects: -- Edi and -- Aehnlich - -are powered by this project. +My projects Edi and Aehnlich are powered by this project. AvalonDock is a WPF Document and Tool Window layout container that is used to arrange documents and tool windows in similar ways than many well known IDEs, such as, Eclipse, Visual Studio,