diff --git a/README.md b/README.md index 93e0718..71bb9e1 100644 --- a/README.md +++ b/README.md @@ -153,7 +153,7 @@ Here is an exemple: x:Class="MicaWPF.DesktopApp.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:mica="clr-namespace:MicaWPF.Styles;assembly=MicaWPF" + xmlns:mica="clr-namespace:MicaWPF.Styles;assembly=MicaWPF" StartupUri="MainWindow.xaml"> diff --git a/src/MicaWPF.Core/Helpers/ServiceLocatorHelper.cs b/src/MicaWPF.Core/Helpers/ServiceLocatorHelper.cs index eb61e15..dc225aa 100644 --- a/src/MicaWPF.Core/Helpers/ServiceLocatorHelper.cs +++ b/src/MicaWPF.Core/Helpers/ServiceLocatorHelper.cs @@ -19,7 +19,7 @@ internal static class ServiceLocatorHelper /// The current namespace. public static string GetNamespace() { - return _assemblies.Any(x => x.GetName().Name == "MicaWPF") ? "MicaWPF" : "MicaWPF.Lite"; + return _assemblies.Any(x => x.GetName().Name == "MicaWPF") ? "MicaWPF" : "MicaWPF.Core"; } /// @@ -36,6 +36,11 @@ public static T GetService() // Simplified assembly search with pattern matching var currentAssembly = _assemblies.FirstOrDefault(x => x.GetName().Name is "MicaWPF" or "MicaWPF.Lite"); + if (currentAssembly?.GetName().Name == "MicaWPF.Lite") + { + currentAssembly = _assemblies.FirstOrDefault(x => x.GetName().Name is "MicaWPF.Core"); + } + if (currentAssembly is not null) { var instance = GetInstanceFromAssembly(currentAssembly, serviceType); diff --git a/src/MicaWPF.Core/MicaWPF.Core.csproj b/src/MicaWPF.Core/MicaWPF.Core.csproj index ee11ccc..1ddaba0 100644 --- a/src/MicaWPF.Core/MicaWPF.Core.csproj +++ b/src/MicaWPF.Core/MicaWPF.Core.csproj @@ -2,6 +2,7 @@ net461;net47;net48;net481;netcoreapp3.1;net6.0-windows;net7.0-windows;net8.0-windows + 7.0 true Copyright (c) 2021 Simnico99 https://github.com/Simnico99/MicaWPF diff --git a/src/MicaWPF/Styles/Assets/Accent.xaml b/src/MicaWPF.Core/Styles/Assets/Accent.xaml similarity index 100% rename from src/MicaWPF/Styles/Assets/Accent.xaml rename to src/MicaWPF.Core/Styles/Assets/Accent.xaml diff --git a/src/MicaWPF/Styles/Controls/Dark/GradientBorder.xaml b/src/MicaWPF.Core/Styles/Controls/Dark/GradientBorder.xaml similarity index 98% rename from src/MicaWPF/Styles/Controls/Dark/GradientBorder.xaml rename to src/MicaWPF.Core/Styles/Controls/Dark/GradientBorder.xaml index 20ce21a..e4e96a2 100644 --- a/src/MicaWPF/Styles/Controls/Dark/GradientBorder.xaml +++ b/src/MicaWPF.Core/Styles/Controls/Dark/GradientBorder.xaml @@ -1,7 +1,7 @@  + xmlns:controls="clr-namespace:MicaWPF.Core.Controls"> - - - - - - - -