From 62a27cc31cee03aadd375ec29646c08f72ede29c Mon Sep 17 00:00:00 2001 From: Mihail Romanov Date: Tue, 16 Jan 2024 12:59:08 +0400 Subject: [PATCH 1/2] Add SpecialInitializeComponent to ColorPicker control --- .../Project/Controls/ColorPicker.xaml.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/WpfDesign.Designer/Project/Controls/ColorPicker.xaml.cs b/WpfDesign.Designer/Project/Controls/ColorPicker.xaml.cs index 4390e48..0f3bd7a 100644 --- a/WpfDesign.Designer/Project/Controls/ColorPicker.xaml.cs +++ b/WpfDesign.Designer/Project/Controls/ColorPicker.xaml.cs @@ -16,6 +16,8 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. +using ICSharpCode.WpfDesign.Designer.themes; +using System; using System.Windows; using System.Windows.Controls; using System.Windows.Data; @@ -28,7 +30,22 @@ public partial class ColorPicker { public ColorPicker() { - InitializeComponent(); + SpecialInitializeComponent(); + } + + /// + /// Fixes InitializeComponent with multiple Versions of same Assembly loaded + /// + public void SpecialInitializeComponent() + { + if (!this._contentLoaded) + { + this._contentLoaded = true; + Uri resourceLocator = new Uri(VersionedAssemblyResourceDictionary.GetXamlNameForType(this.GetType()), UriKind.Relative); + Application.LoadComponent(this, resourceLocator); + } + + this.InitializeComponent(); } public static readonly DependencyProperty ColorProperty = From c2e7625a3155d0d8f5f637003fade3baef843b5b Mon Sep 17 00:00:00 2001 From: Mihail Romanov Date: Tue, 16 Jan 2024 13:00:27 +0400 Subject: [PATCH 2/2] Upgrade NUnit and NUnit3TestAdapter - for work with installed .Net 7 --- WpfDesign.Designer/Tests/WpfDesign.Tests.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WpfDesign.Designer/Tests/WpfDesign.Tests.csproj b/WpfDesign.Designer/Tests/WpfDesign.Tests.csproj index 09295e9..bfacce3 100644 --- a/WpfDesign.Designer/Tests/WpfDesign.Tests.csproj +++ b/WpfDesign.Designer/Tests/WpfDesign.Tests.csproj @@ -7,8 +7,8 @@ ICSharpCode.WpfDesign.Tests - - + +