├── LICENSE.md ├── README.md ├── dynamicmodules.png └── src ├── DM.Core ├── CoreModule.cs ├── DM.Core.csproj ├── Interfaces │ └── ILinkGroupService.cs ├── Model │ └── Customer.cs ├── Properties │ └── AssemblyInfo.cs ├── Services │ ├── CustomerService.cs │ └── ICustomerService.cs ├── app.config └── packages.config ├── DM.ModuleOne ├── DM.ModuleOne.csproj ├── ModuleOne.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Services │ └── LinkGroupService.cs ├── ViewModels │ └── DataGridViewModel.cs ├── Views │ ├── DataGrid.xaml │ ├── DataGrid.xaml.cs │ ├── LoremIpsum1.xaml │ ├── LoremIpsum1.xaml.cs │ ├── LoremIpsum2.xaml │ ├── LoremIpsum2.xaml.cs │ ├── MainView.xaml │ └── MainView.xaml.cs ├── app.config └── packages.config ├── DM.ModuleTwo ├── DM.ModuleTwo.csproj ├── ModuleTwo.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Services │ └── LinkGroupService.cs ├── ViewModels │ └── DataGridViewModel.cs ├── Views │ ├── DataGrid.xaml │ ├── DataGrid.xaml.cs │ ├── LoremIpsum1.xaml │ ├── LoremIpsum1.xaml.cs │ ├── LoremIpsum2.xaml │ ├── LoremIpsum2.xaml.cs │ ├── MainView.xaml │ └── MainView.xaml.cs ├── app.config └── packages.config ├── DynamicModules.sln └── DynamicModules ├── App.config ├── App.xaml ├── App.xaml.cs ├── Constants └── ThemesPath.cs ├── DM.Demo.csproj ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── Shell.xaml ├── Shell.xaml.cs ├── Styles └── CustomUI.xaml ├── Themes ├── BingImage.cs ├── DMTheme.xaml ├── DarkBingImageTheme.xaml ├── DarkTheme.xaml ├── LightBingImageTheme.xaml ├── LightTheme.xaml ├── MacOSXTheme.xaml ├── Windows10Theme.xaml ├── background.macosx.jpg ├── background.windows10.jpg └── dm-logo.png ├── ViewModels ├── DataGridViewModel.cs └── SettingsAppearanceViewModel.cs ├── Views ├── DataGrid.xaml ├── DataGrid.xaml.cs ├── IntroductionView.xaml ├── IntroductionView.xaml.cs ├── LoremIpsum1.xaml ├── LoremIpsum1.xaml.cs ├── LoremIpsum2.xaml ├── LoremIpsum2.xaml.cs ├── LoremIpsum3.xaml ├── LoremIpsum3.xaml.cs ├── LoremIpsumView.xaml ├── LoremIpsumView.xaml.cs ├── MUIView.xaml ├── MUIView.xaml.cs ├── SettingsAppearance.xaml ├── SettingsAppearance.xaml.cs ├── SettingsView.xaml └── SettingsView.xaml.cs ├── dm.ico └── packages.config /LICENSE.md: -------------------------------------------------------------------------------- 1 | Microsoft Public License (Ms-PL) 2 | 3 | This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. 4 | 5 | 1. Definitions 6 | 7 | The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. 8 | 9 | A "contribution" is the original software, or any additions or changes to the software. 10 | 11 | A "contributor" is any person that distributes its contribution under this license. 12 | 13 | "Licensed patents" are a contributor's patent claims that read directly on its contribution. 14 | 15 | 2. Grant of Rights 16 | 17 | (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. 18 | 19 | (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. 20 | 21 | 3. Conditions and Limitations 22 | 23 | (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. 24 | 25 | (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. 26 | 27 | (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. 28 | 29 | (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. 30 | 31 | (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Dynamic Modules 2 | Dynamic Modules is a sample prototype for a WPF modular application based on the [Prism Library](https://github.com/PrismLibrary/Prism) and the [Modern UI for WPF (MUI)](https://github.com/firstfloorsoftware/mui) Toolkit. It is a proof of concept for creating metro-styled, modern UI WPF applications in a plugin architecture. 3 | 4 | ![](https://github.com/hinojosachapel/DynamicModules/blob/master/dynamicmodules.png) 5 | 6 | A little while ago, a colleague of mine told me about a problem he had to solve. A customer asked him to develop a desktop application that presents a different set of features in accordance to which of the enterprise offices is running the software. On the one hand, I remembered how to do that from a past project where I was involved. On the other hand, [there is an open source project](https://github.com/firstfloorsoftware/mui) for creating WPF applications with a modern look & feel, which I am following since a couple of years because I think it's really great. 7 | 8 | I wondered if there is a way to solve the problem by using Prism and the open source MUI library for creating a plugin architecture, and came up with a prototype solution which I am presenting here. 9 | 10 | ## The central ideas for the proposed plugin architecture are: 11 | 12 | * Put into a directory the desired project modules (or put them all and run a filter on loading time). 13 | * Dynamically load the project modules from the modules folder. 14 | * Each module exposes an entry point for an option in the main menu. 15 | * Dynamically build the main menu from the loaded modules. 16 | * The first option in the main menu is fixed and common for every user. 17 | * A core module with shared services, repositories, DTOs, data model definitions, etc., is statically loaded. It can be referenced by any solution project. 18 | 19 | Dynamic Modules are copied to a directory as part of a post-build step. These modules are not referenced in the startup project and are discovered by examining the assemblies in a directory. The module projects have the following post-build step in order to copy themselves into that directory: 20 | 21 | xcopy "$(TargetDir)$(TargetFileName)" "$(TargetDir)modules\" /y 22 | 23 | Note that the solution is built into "..\bin\" folder. 24 | 25 | WARNING! Do not forget to build the solution (F6) before each running so the modules are copied into the modules folder. 26 | 27 | ### Links of interest 28 | You may find complementary information at: 29 | * [Dynamic Modules with Prism and the Modern UI for WPF Toolkit](http://www.codeproject.com/Articles/1087362/Dynamic-Modules-with-Prism-and-the-Modern-UI-for-WPF-toolkit) 30 | * [Modern UI for WPF (MUI) Demo project](https://github.com/firstfloorsoftware/mui/tree/master/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App) 31 | * [Modern UI for WPF Templates (Visual Studio Extension)](https://visualstudiogallery.msdn.microsoft.com/7a4362a7-fe5d-4f9d-bc7b-0c0dc272fe31) 32 | * [Prism Samples WPF / Modularity With Unity](https://github.com/PrismLibrary/Prism-Samples-Wpf/tree/master/Modularity/ModularityWithUnity) 33 | * [On Prism's ViewModelLocator convention*](http://brianlagunas.com/getting-started-prisms-new-viewmodellocator/) 34 | 35 | *Currently there is no need to "implement" the IView interface in the view's code-behind. 36 | 37 | ### Contributors 38 | * [hinojosachapel](https://github.com/hinojosachapel) -------------------------------------------------------------------------------- /dynamicmodules.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hinojosachapel/DynamicModules/50ba7e3e81f97896264a79624b7e88f5c6519907/dynamicmodules.png -------------------------------------------------------------------------------- /src/DM.Core/CoreModule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Prism.Ioc; 3 | using Prism.Modularity; 4 | using DM.Core.Services; 5 | 6 | namespace DM.Core 7 | { 8 | public class CoreModule : IModule 9 | { 10 | public void OnInitialized(IContainerProvider containerProvider) 11 | { 12 | 13 | } 14 | 15 | public void RegisterTypes(IContainerRegistry containerRegistry) 16 | { 17 | containerRegistry.Register(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/DM.Core/DM.Core.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {085A3767-0F46-4923-8EB5-596CE276FC47} 8 | Library 9 | Properties 10 | DM.Core 11 | DM.Core 12 | v4.5.2 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | ..\bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | ..\bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | 34 | ..\packages\Unity.5.8.13\lib\net45\CommonServiceLocator.dll 35 | 36 | 37 | ..\packages\ModernUI.WPF.1.0.9\lib\net45\FirstFloor.ModernUI.dll 38 | 39 | 40 | ..\packages\Prism.Core.7.1.0.431\lib\net45\Prism.dll 41 | 42 | 43 | ..\packages\Prism.Unity.7.1.0.431\lib\net45\Prism.Unity.Wpf.dll 44 | 45 | 46 | ..\packages\Prism.Wpf.7.1.0.431\lib\net45\Prism.Wpf.dll 47 | 48 | 49 | 50 | 51 | 52 | ..\packages\Prism.Wpf.7.1.0.431\lib\net45\System.Windows.Interactivity.dll 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | ..\packages\Unity.Abstractions.3.3.1\lib\net45\Unity.Abstractions.dll 62 | 63 | 64 | ..\packages\Unity.5.8.13\lib\net45\Unity.Configuration.dll 65 | 66 | 67 | ..\packages\Unity.Container.5.8.13\lib\net45\Unity.Container.dll 68 | 69 | 70 | ..\packages\Unity.5.8.13\lib\net45\Unity.Interception.dll 71 | 72 | 73 | ..\packages\Unity.5.8.13\lib\net45\Unity.Interception.Configuration.dll 74 | 75 | 76 | ..\packages\Unity.5.8.13\lib\net45\Unity.RegistrationByConvention.dll 77 | 78 | 79 | ..\packages\Unity.5.8.13\lib\net45\Unity.ServiceLocation.dll 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 102 | -------------------------------------------------------------------------------- /src/DM.Core/Interfaces/ILinkGroupService.cs: -------------------------------------------------------------------------------- 1 | using FirstFloor.ModernUI.Presentation; 2 | 3 | namespace DM.Core.Interfaces 4 | { 5 | public interface ILinkGroupService 6 | { 7 | LinkGroup GetLinkGroup(); 8 | } 9 | } -------------------------------------------------------------------------------- /src/DM.Core/Model/Customer.cs: -------------------------------------------------------------------------------- 1 | namespace DM.Core.Model 2 | { 3 | // taken from MSDN (http://msdn.microsoft.com/en-us/library/system.windows.controls.datagrid.aspx) 4 | public enum OrderStatus { None, New, Processing, Shipped, Received }; 5 | 6 | public class Customer 7 | { 8 | public string FirstName { get; set; } 9 | public string LastName { get; set; } 10 | public string Email { get; set; } 11 | public bool IsMember { get; set; } 12 | public OrderStatus Status { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/DM.Core/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // La información general de un ensamblado se controla mediante el siguiente 6 | // conjunto de atributos. Cambie estos valores de atributo para modificar la información 7 | // asociada con un ensamblado. 8 | [assembly: AssemblyTitle("DM.Core")] 9 | [assembly: AssemblyDescription("Core module")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Rubén Hinojosa Chapel")] 12 | [assembly: AssemblyProduct("Dynamic Modules")] 13 | [assembly: AssemblyCopyright("Copyright © 2016 by Rubén Hinojosa Chapel")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles 18 | // para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde 19 | // COM, establezca el atributo ComVisible en true en este tipo. 20 | [assembly: ComVisible(false)] 21 | 22 | // El siguiente GUID sirve como id. de typelib si este proyecto se expone a COM. 23 | [assembly: Guid("085a3767-0f46-4923-8eb5-596ce276fc47")] 24 | 25 | // La información de versión de un ensamblado consta de los cuatro valores siguientes: 26 | // 27 | // Versión principal 28 | // Versión secundaria 29 | // Número de compilación 30 | // Revisión 31 | // 32 | // Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión 33 | // mediante el carácter '*', como se muestra a continuación: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/DM.Core/Services/CustomerService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DM.Core.Model; 3 | 4 | namespace DM.Core.Services 5 | { 6 | public class CustomerService : ICustomerService 7 | { 8 | public List GetAllCustomers() 9 | { 10 | var customers = new List(); 11 | 12 | customers.Add(new Customer { FirstName = "Orlando", LastName = "Gee", Email = "orlando@adventure-works.com", IsMember = true, Status = OrderStatus.New }); 13 | customers.Add(new Customer { FirstName = "Keith", LastName = "Harris", Email = "keith@adventure-works.com", IsMember = true, Status = OrderStatus.Received }); 14 | customers.Add(new Customer { FirstName = "Donna", LastName = "Carreras", Email = "donna@adventure-works.com", IsMember = false, Status = OrderStatus.None }); 15 | customers.Add(new Customer { FirstName = "Janet", LastName = "Gates", Email = "janet@adventure-works.com", IsMember = true, Status = OrderStatus.Shipped }); 16 | customers.Add(new Customer { FirstName = "Lucy", LastName = "Harrington", Email = "lucy@adventure-works.com", IsMember = false, Status = OrderStatus.New }); 17 | customers.Add(new Customer { FirstName = "Rosmarie", LastName = "Carroll", Email = "rosmarie@adventure-works.com", IsMember = true, Status = OrderStatus.Processing }); 18 | customers.Add(new Customer { FirstName = "Dominic", LastName = "Gash", Email = "dominic@adventure-works.com", IsMember = true, Status = OrderStatus.Received }); 19 | customers.Add(new Customer { FirstName = "Kathleen", LastName = "Garza", Email = "kathleen@adventure-works.com", IsMember = false, Status = OrderStatus.None }); 20 | customers.Add(new Customer { FirstName = "Katherine", LastName = "Harding", Email = "katherine@adventure-works.com", IsMember = true, Status = OrderStatus.Shipped }); 21 | customers.Add(new Customer { FirstName = "Johnny", LastName = "Caprio", Email = "johnny@adventure-works.com", IsMember = false, Status = OrderStatus.Processing }); 22 | 23 | return customers; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/DM.Core/Services/ICustomerService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DM.Core.Model; 3 | 4 | namespace DM.Core.Services 5 | { 6 | public interface ICustomerService 7 | { 8 | List GetAllCustomers(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/DM.Core/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/DM.Core/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/DM.ModuleOne.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {36B72692-ED5B-4DA8-98E7-795CAE23F342} 8 | library 9 | Properties 10 | DM.ModuleOne 11 | DM.ModuleOne 12 | v4.5.2 13 | 512 14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15 | 4 16 | 17 | 18 | true 19 | full 20 | false 21 | ..\bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | pdbonly 28 | true 29 | ..\bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | Always 36 | 37 | 38 | 39 | ..\packages\Unity.5.8.13\lib\net45\CommonServiceLocator.dll 40 | 41 | 42 | ..\packages\ModernUI.WPF.1.0.9\lib\net45\FirstFloor.ModernUI.dll 43 | 44 | 45 | ..\packages\Prism.Core.7.1.0.431\lib\net45\Prism.dll 46 | 47 | 48 | ..\packages\Prism.Unity.7.1.0.431\lib\net45\Prism.Unity.Wpf.dll 49 | 50 | 51 | ..\packages\Prism.Wpf.7.1.0.431\lib\net45\Prism.Wpf.dll 52 | 53 | 54 | 55 | 56 | 57 | ..\packages\Prism.Wpf.7.1.0.431\lib\net45\System.Windows.Interactivity.dll 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 4.0 67 | 68 | 69 | ..\packages\Unity.Abstractions.3.3.1\lib\net45\Unity.Abstractions.dll 70 | 71 | 72 | ..\packages\Unity.5.8.13\lib\net45\Unity.Configuration.dll 73 | 74 | 75 | ..\packages\Unity.Container.5.8.13\lib\net45\Unity.Container.dll 76 | 77 | 78 | ..\packages\Unity.5.8.13\lib\net45\Unity.Interception.dll 79 | 80 | 81 | ..\packages\Unity.5.8.13\lib\net45\Unity.Interception.Configuration.dll 82 | 83 | 84 | ..\packages\Unity.5.8.13\lib\net45\Unity.RegistrationByConvention.dll 85 | 86 | 87 | ..\packages\Unity.5.8.13\lib\net45\Unity.ServiceLocation.dll 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | DataGrid.xaml 97 | 98 | 99 | LoremIpsum2.xaml 100 | 101 | 102 | LoremIpsum1.xaml 103 | 104 | 105 | 106 | 107 | MainView.xaml 108 | 109 | 110 | MSBuild:Compile 111 | Designer 112 | 113 | 114 | MSBuild:Compile 115 | Designer 116 | 117 | 118 | MSBuild:Compile 119 | Designer 120 | 121 | 122 | MSBuild:Compile 123 | Designer 124 | 125 | 126 | 127 | 128 | Code 129 | 130 | 131 | True 132 | True 133 | Resources.resx 134 | 135 | 136 | True 137 | Settings.settings 138 | True 139 | 140 | 141 | ResXFileCodeGenerator 142 | Resources.Designer.cs 143 | 144 | 145 | 146 | 147 | SettingsSingleFileGenerator 148 | Settings.Designer.cs 149 | 150 | 151 | 152 | 153 | 154 | 155 | {085a3767-0f46-4923-8eb5-596ce276fc47} 156 | DM.Core 157 | 158 | 159 | 160 | 161 | xcopy "$(TargetDir)$(TargetFileName)" "$(TargetDir)modules\" /y 162 | 163 | 170 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/ModuleOne.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Prism.Ioc; 3 | using Prism.Modularity; 4 | 5 | namespace DM.ModuleOne 6 | { 7 | public class ModuleOne : IModule 8 | { 9 | public void OnInitialized(IContainerProvider containerProvider) 10 | { 11 | 12 | } 13 | 14 | public void RegisterTypes(IContainerRegistry containerRegistry) 15 | { 16 | //containerRegistry.Register(); 17 | System.Windows.MessageBox.Show($"{nameof(ModuleOne)} has been initialized ;-)"); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/DM.ModuleOne/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // La información general de un ensamblado se controla mediante el siguiente 8 | // conjunto de atributos. Cambie estos valores de atributo para modificar la información 9 | // asociada con un ensamblado. 10 | [assembly: AssemblyTitle("DM.ModuleOne")] 11 | [assembly: AssemblyDescription("Demo module")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("Rubén Hinojosa Chapel")] 14 | [assembly: AssemblyProduct("Dynamic Modules")] 15 | [assembly: AssemblyCopyright("Copyright © 2016 by Rubén Hinojosa Chapel")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles 20 | // para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde 21 | // COM, establezca el atributo ComVisible en true en este tipo. 22 | [assembly: ComVisible(false)] 23 | 24 | //Para comenzar a compilar aplicaciones que se puedan traducir, establezca 25 | //CultureYouAreCodingWith en el archivo .csproj 26 | //dentro de . Por ejemplo, si utiliza inglés de EE.UU. 27 | //en los archivos de código fuente, establezca en en-US. A continuación, quite la marca de comentario 28 | //del atributo NeutralResourceLanguage. Actualice "en-US" en 29 | //la siguiente línea para que coincida con el valor UICulture del archivo de proyecto. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly:ThemeInfo( 35 | ResourceDictionaryLocation.None, //donde se encuentran los diccionarios de recursos específicos del tema 36 | //(se utiliza si no se encuentra ningún recurso en la página 37 | // ni diccionarios de recursos de la aplicación) 38 | ResourceDictionaryLocation.SourceAssembly //donde se encuentra el diccionario de recursos genérico 39 | //(se utiliza si no se encuentra ningún recurso en la página, 40 | // aplicación o diccionarios de recursos específicos del tema) 41 | )] 42 | 43 | 44 | // La información de versión de un ensamblado consta de los cuatro valores siguientes: 45 | // 46 | // Versión principal 47 | // Versión secundaria 48 | // Número de compilación 49 | // Revisión 50 | // 51 | // Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión 52 | // mediante el carácter '*', como se muestra a continuación: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Este código fue generado por una herramienta. 4 | // Versión de runtime:4.0.30319.42000 5 | // 6 | // Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si 7 | // se vuelve a generar el código. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DM.ModuleOne.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// Clase de recurso fuertemente tipado, para buscar cadenas traducidas, etc. 17 | /// 18 | // StronglyTypedResourceBuilder generó automáticamente esta clase 19 | // a través de una herramienta como ResGen o Visual Studio. 20 | // Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen 21 | // con la opción /str o recompile su proyecto de VS. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DM.ModuleOne.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las 51 | /// búsquedas de recursos mediante esta clase de recurso fuertemente tipado. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Este código fue generado por una herramienta. 4 | // Versión de runtime:4.0.30319.42000 5 | // 6 | // Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si 7 | // se vuelve a generar el código. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DM.ModuleOne.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/Services/LinkGroupService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using FirstFloor.ModernUI.Presentation; 3 | using DM.Core.Interfaces; 4 | using DM.ModuleOne.Views; 5 | 6 | namespace DM.ModuleOne.Services 7 | { 8 | /// 9 | /// Creates a LinkGroup 10 | /// 11 | /// 12 | /// 13 | /// This is the entry point for the option menu. 14 | /// 15 | public class LinkGroupService : ILinkGroupService 16 | { 17 | public LinkGroup GetLinkGroup() 18 | { 19 | LinkGroup linkGroup = new LinkGroup 20 | { 21 | DisplayName = "Module One" 22 | }; 23 | 24 | linkGroup.Links.Add(new Link 25 | { 26 | DisplayName = "Module One", 27 | Source = new Uri($"/DM.ModuleOne;component/Views/{nameof(MainView)}.xaml", UriKind.Relative) 28 | }); 29 | 30 | return linkGroup; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/ViewModels/DataGridViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | using System.Linq; 3 | using Prism.Mvvm; 4 | using DM.Core.Model; 5 | using DM.Core.Services; 6 | 7 | namespace DM.ModuleOne.ViewModels 8 | { 9 | public class DataGridViewModel : BindableBase 10 | { 11 | private ObservableCollection _customers; 12 | public ObservableCollection Customers 13 | { 14 | get { return _customers; } 15 | set { SetProperty(ref _customers, value); } 16 | } 17 | 18 | public DataGridViewModel(ICustomerService service) 19 | { 20 | Customers = new ObservableCollection(); 21 | Customers.AddRange(service.GetAllCustomers().OrderBy(c => c.FirstName)); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/Views/DataGrid.xaml: -------------------------------------------------------------------------------- 1 |  13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/Views/DataGrid.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace DM.ModuleOne.Views 4 | { 5 | /// 6 | /// Interaction logic for DataGrid.xaml 7 | /// 8 | public partial class DataGrid : UserControl 9 | { 10 | public DataGrid() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/Views/LoremIpsum1.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/Views/LoremIpsum1.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace DM.ModuleOne.Views 4 | { 5 | /// 6 | /// Interaction logic for LoremIpsum1.xaml 7 | /// 8 | public partial class LoremIpsum1 : UserControl 9 | { 10 | public LoremIpsum1() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/Views/LoremIpsum2.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/Views/LoremIpsum2.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace DM.ModuleOne.Views 4 | { 5 | /// 6 | /// Interaction logic for LoremIpsum2.xaml 7 | /// 8 | public partial class LoremIpsum2 : UserControl 9 | { 10 | public LoremIpsum2() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/Views/MainView.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/Views/MainView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace DM.ModuleOne.Views 4 | { 5 | /// 6 | /// Interaction logic for MainView.xaml 7 | /// 8 | public partial class MainView : UserControl 9 | { 10 | public MainView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/DM.ModuleOne/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/DM.ModuleTwo.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {9D0FFEDA-5F0D-489C-AEC8-603D2405CA0D} 8 | library 9 | Properties 10 | DM.ModuleTwo 11 | DM.ModuleTwo 12 | v4.5.2 13 | 512 14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15 | 4 16 | 17 | 18 | true 19 | full 20 | false 21 | ..\bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | pdbonly 28 | true 29 | ..\bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | Always 36 | 37 | 38 | 39 | ..\packages\Unity.5.8.13\lib\net45\CommonServiceLocator.dll 40 | 41 | 42 | ..\packages\ModernUI.WPF.1.0.9\lib\net45\FirstFloor.ModernUI.dll 43 | 44 | 45 | ..\packages\Prism.Core.7.1.0.431\lib\net45\Prism.dll 46 | 47 | 48 | ..\packages\Prism.Unity.7.1.0.431\lib\net45\Prism.Unity.Wpf.dll 49 | 50 | 51 | ..\packages\Prism.Wpf.7.1.0.431\lib\net45\Prism.Wpf.dll 52 | 53 | 54 | 55 | 56 | 57 | ..\packages\Prism.Wpf.7.1.0.431\lib\net45\System.Windows.Interactivity.dll 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 4.0 67 | 68 | 69 | ..\packages\Unity.Abstractions.3.3.1\lib\net45\Unity.Abstractions.dll 70 | 71 | 72 | ..\packages\Unity.5.8.13\lib\net45\Unity.Configuration.dll 73 | 74 | 75 | ..\packages\Unity.Container.5.8.13\lib\net45\Unity.Container.dll 76 | 77 | 78 | ..\packages\Unity.5.8.13\lib\net45\Unity.Interception.dll 79 | 80 | 81 | ..\packages\Unity.5.8.13\lib\net45\Unity.Interception.Configuration.dll 82 | 83 | 84 | ..\packages\Unity.5.8.13\lib\net45\Unity.RegistrationByConvention.dll 85 | 86 | 87 | ..\packages\Unity.5.8.13\lib\net45\Unity.ServiceLocation.dll 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | DataGrid.xaml 99 | 100 | 101 | LoremIpsum1.xaml 102 | 103 | 104 | LoremIpsum2.xaml 105 | 106 | 107 | MainView.xaml 108 | 109 | 110 | MSBuild:Compile 111 | Designer 112 | 113 | 114 | MSBuild:Compile 115 | Designer 116 | 117 | 118 | MSBuild:Compile 119 | Designer 120 | 121 | 122 | MSBuild:Compile 123 | Designer 124 | 125 | 126 | 127 | 128 | Code 129 | 130 | 131 | True 132 | True 133 | Resources.resx 134 | 135 | 136 | True 137 | Settings.settings 138 | True 139 | 140 | 141 | ResXFileCodeGenerator 142 | Resources.Designer.cs 143 | 144 | 145 | 146 | 147 | SettingsSingleFileGenerator 148 | Settings.Designer.cs 149 | 150 | 151 | 152 | 153 | 154 | 155 | {085a3767-0f46-4923-8eb5-596ce276fc47} 156 | DM.Core 157 | 158 | 159 | 160 | 161 | xcopy "$(TargetDir)$(TargetFileName)" "$(TargetDir)modules\" /y 162 | 163 | 170 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/ModuleTwo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Prism.Ioc; 3 | using Prism.Modularity; 4 | 5 | namespace DM.ModuleTwo 6 | { 7 | public class ModuleTwo : IModule 8 | { 9 | public void OnInitialized(IContainerProvider containerProvider) 10 | { 11 | 12 | } 13 | 14 | public void RegisterTypes(IContainerRegistry containerRegistry) 15 | { 16 | //containerRegistry.Register(); 17 | System.Windows.MessageBox.Show($"{nameof(ModuleTwo)} has been initialized ;-)"); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/DM.ModuleTwo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // La información general de un ensamblado se controla mediante el siguiente 8 | // conjunto de atributos. Cambie estos valores de atributo para modificar la información 9 | // asociada con un ensamblado. 10 | [assembly: AssemblyTitle("DM.ModuleOne")] 11 | [assembly: AssemblyDescription("Demo module")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("Rubén Hinojosa Chapel")] 14 | [assembly: AssemblyProduct("Dynamic Modules")] 15 | [assembly: AssemblyCopyright("Copyright © 2016 by Rubén Hinojosa Chapel")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles 20 | // para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde 21 | // COM, establezca el atributo ComVisible en true en este tipo. 22 | [assembly: ComVisible(false)] 23 | 24 | //Para comenzar a compilar aplicaciones que se puedan traducir, establezca 25 | //CultureYouAreCodingWith en el archivo .csproj 26 | //dentro de . Por ejemplo, si utiliza inglés de EE.UU. 27 | //en los archivos de código fuente, establezca en en-US. A continuación, quite la marca de comentario 28 | //del atributo NeutralResourceLanguage. Actualice "en-US" en 29 | //la siguiente línea para que coincida con el valor UICulture del archivo de proyecto. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly:ThemeInfo( 35 | ResourceDictionaryLocation.None, //donde se encuentran los diccionarios de recursos específicos del tema 36 | //(se utiliza si no se encuentra ningún recurso en la página 37 | // ni diccionarios de recursos de la aplicación) 38 | ResourceDictionaryLocation.SourceAssembly //donde se encuentra el diccionario de recursos genérico 39 | //(se utiliza si no se encuentra ningún recurso en la página, 40 | // aplicación o diccionarios de recursos específicos del tema) 41 | )] 42 | 43 | 44 | // La información de versión de un ensamblado consta de los cuatro valores siguientes: 45 | // 46 | // Versión principal 47 | // Versión secundaria 48 | // Número de compilación 49 | // Revisión 50 | // 51 | // Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión 52 | // mediante el carácter '*', como se muestra a continuación: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DM.ModuleTwo.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DM.ModuleTwo.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DM.ModuleTwo.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/Services/LinkGroupService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using FirstFloor.ModernUI.Presentation; 3 | using DM.Core.Interfaces; 4 | using DM.ModuleTwo.Views; 5 | 6 | namespace DM.ModuleTwo.Services 7 | { 8 | /// 9 | /// Creates a LinkGroup 10 | /// 11 | /// 12 | /// 13 | /// This is the entry point for the option menu. 14 | /// 15 | public class LinkGroupService : ILinkGroupService 16 | { 17 | public LinkGroup GetLinkGroup() 18 | { 19 | LinkGroup linkGroup = new LinkGroup 20 | { 21 | DisplayName = "Module Two" 22 | }; 23 | 24 | linkGroup.Links.Add(new Link 25 | { 26 | DisplayName = "Module Two", 27 | Source = new Uri($"/DM.ModuleTwo;component/Views/{nameof(MainView)}.xaml", UriKind.Relative) 28 | }); 29 | 30 | return linkGroup; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/ViewModels/DataGridViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | using System.Linq; 3 | using Prism.Mvvm; 4 | using DM.Core.Model; 5 | using DM.Core.Services; 6 | 7 | namespace DM.ModuleTwo.ViewModels 8 | { 9 | public class DataGridViewModel : BindableBase 10 | { 11 | private ObservableCollection _customers; 12 | public ObservableCollection Customers 13 | { 14 | get { return _customers; } 15 | set { SetProperty(ref _customers, value); } 16 | } 17 | 18 | public DataGridViewModel(ICustomerService service) 19 | { 20 | Customers = new ObservableCollection(); 21 | Customers.AddRange(service.GetAllCustomers().OrderBy(c => c.LastName)); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/Views/DataGrid.xaml: -------------------------------------------------------------------------------- 1 |  13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/Views/DataGrid.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace DM.ModuleTwo.Views 4 | { 5 | /// 6 | /// Interaction logic for DataGrid.xaml 7 | /// 8 | public partial class DataGrid : UserControl 9 | { 10 | public DataGrid() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/Views/LoremIpsum1.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/Views/LoremIpsum1.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace DM.ModuleTwo.Views 4 | { 5 | /// 6 | /// Interaction logic for LoremIpsum1.xaml 7 | /// 8 | public partial class LoremIpsum1 : UserControl 9 | { 10 | public LoremIpsum1() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/Views/LoremIpsum2.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/Views/LoremIpsum2.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace DM.ModuleTwo.Views 4 | { 5 | /// 6 | /// Interaction logic for LoremIpsum2.xaml 7 | /// 8 | public partial class LoremIpsum2 : UserControl 9 | { 10 | public LoremIpsum2() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/Views/MainView.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/Views/MainView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace DM.ModuleTwo.Views 4 | { 5 | /// 6 | /// Interaction logic for MainView.xaml 7 | /// 8 | public partial class MainView : UserControl 9 | { 10 | public MainView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/DM.ModuleTwo/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/DynamicModules.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DM.Demo", "DynamicModules\DM.Demo.csproj", "{EFDBFC84-CFA2-4AB2-A94F-9A3CC58E091F}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DM.Core", "DM.Core\DM.Core.csproj", "{085A3767-0F46-4923-8EB5-596CE276FC47}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DM.ModuleOne", "DM.ModuleOne\DM.ModuleOne.csproj", "{36B72692-ED5B-4DA8-98E7-795CAE23F342}" 11 | EndProject 12 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{B4821B4E-FD33-4426-94BD-41CA302FB6DF}" 13 | EndProject 14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DM.ModuleTwo", "DM.ModuleTwo\DM.ModuleTwo.csproj", "{9D0FFEDA-5F0D-489C-AEC8-603D2405CA0D}" 15 | EndProject 16 | Global 17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 18 | Debug|Any CPU = Debug|Any CPU 19 | Release|Any CPU = Release|Any CPU 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {EFDBFC84-CFA2-4AB2-A94F-9A3CC58E091F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {EFDBFC84-CFA2-4AB2-A94F-9A3CC58E091F}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {EFDBFC84-CFA2-4AB2-A94F-9A3CC58E091F}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {EFDBFC84-CFA2-4AB2-A94F-9A3CC58E091F}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {085A3767-0F46-4923-8EB5-596CE276FC47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {085A3767-0F46-4923-8EB5-596CE276FC47}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {085A3767-0F46-4923-8EB5-596CE276FC47}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {085A3767-0F46-4923-8EB5-596CE276FC47}.Release|Any CPU.Build.0 = Release|Any CPU 30 | {36B72692-ED5B-4DA8-98E7-795CAE23F342}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 31 | {36B72692-ED5B-4DA8-98E7-795CAE23F342}.Debug|Any CPU.Build.0 = Debug|Any CPU 32 | {36B72692-ED5B-4DA8-98E7-795CAE23F342}.Release|Any CPU.ActiveCfg = Release|Any CPU 33 | {36B72692-ED5B-4DA8-98E7-795CAE23F342}.Release|Any CPU.Build.0 = Release|Any CPU 34 | {9D0FFEDA-5F0D-489C-AEC8-603D2405CA0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 35 | {9D0FFEDA-5F0D-489C-AEC8-603D2405CA0D}.Debug|Any CPU.Build.0 = Debug|Any CPU 36 | {9D0FFEDA-5F0D-489C-AEC8-603D2405CA0D}.Release|Any CPU.ActiveCfg = Release|Any CPU 37 | {9D0FFEDA-5F0D-489C-AEC8-603D2405CA0D}.Release|Any CPU.Build.0 = Release|Any CPU 38 | EndGlobalSection 39 | GlobalSection(SolutionProperties) = preSolution 40 | HideSolutionNode = FALSE 41 | EndGlobalSection 42 | GlobalSection(NestedProjects) = preSolution 43 | {36B72692-ED5B-4DA8-98E7-795CAE23F342} = {B4821B4E-FD33-4426-94BD-41CA302FB6DF} 44 | {9D0FFEDA-5F0D-489C-AEC8-603D2405CA0D} = {B4821B4E-FD33-4426-94BD-41CA302FB6DF} 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /src/DynamicModules/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/DynamicModules/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/DynamicModules/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Windows; 4 | using Prism.Ioc; 5 | using Prism.Modularity; 6 | using FirstFloor.ModernUI.Presentation; 7 | using DM.Core.Interfaces; 8 | 9 | namespace DM.Demo 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App 15 | { 16 | private const string MODULES_PATH = @".\modules"; 17 | private LinkGroupCollection linkGroupCollection = null; 18 | 19 | protected override Window CreateShell() 20 | { 21 | var shell = Container.Resolve(); 22 | 23 | if (linkGroupCollection != null) 24 | { 25 | shell.AddLinkGroups(linkGroupCollection); 26 | } 27 | 28 | return (Window)shell; 29 | } 30 | 31 | protected override void RegisterTypes(IContainerRegistry containerRegistry) 32 | { 33 | //containerRegistry.Register(); 34 | } 35 | 36 | protected override IModuleCatalog CreateModuleCatalog() 37 | { 38 | return new DirectoryModuleCatalog() { ModulePath = MODULES_PATH }; 39 | } 40 | 41 | protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog) 42 | { 43 | // Dynamic Modules are copied to a directory as part of a post-build step. 44 | // These modules are not referenced in the startup project and are discovered 45 | // by examining the assemblies in a directory. The module projects have the 46 | // following post-build step in order to copy themselves into that directory: 47 | // 48 | // xcopy "$(TargetDir)$(TargetFileName)" "$(TargetDir)modules\" /y 49 | // 50 | // WARNING! Do not forget to build the solution (F6) before each running 51 | // so the modules are copied into the modules folder. 52 | var directoryCatalog = (DirectoryModuleCatalog)moduleCatalog; 53 | directoryCatalog.Initialize(); 54 | 55 | linkGroupCollection = new LinkGroupCollection(); 56 | var typeFilter = new TypeFilter(InterfaceFilter); 57 | 58 | foreach (var module in directoryCatalog.Items) 59 | { 60 | var mi = (ModuleInfo)module; 61 | var asm = Assembly.LoadFrom(mi.Ref); 62 | 63 | foreach (Type t in asm.GetTypes()) 64 | { 65 | var myInterfaces = t.FindInterfaces(typeFilter, typeof(ILinkGroupService).ToString()); 66 | 67 | if (myInterfaces.Length > 0) 68 | { 69 | // We found the type that implements the ILinkGroupService interface 70 | var linkGroupService = (ILinkGroupService)asm.CreateInstance(t.FullName); 71 | var linkGroup = linkGroupService.GetLinkGroup(); 72 | linkGroupCollection.Add(linkGroup); 73 | } 74 | } 75 | } 76 | 77 | moduleCatalog.AddModule(typeof(Core.CoreModule)); 78 | } 79 | 80 | private bool InterfaceFilter(Type typeObj, Object criteriaObj) 81 | { 82 | return typeObj.ToString() == criteriaObj.ToString(); 83 | } 84 | } 85 | } -------------------------------------------------------------------------------- /src/DynamicModules/Constants/ThemesPath.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace DM.Demo.Constants 8 | { 9 | public struct ThemesPath 10 | { 11 | public const string Light = "/Themes/LightTheme.xaml"; 12 | public const string Dark = "/Themes/DarkTheme.xaml"; 13 | public const string DM = "/Themes/DMTheme.xaml"; 14 | public const string LightBingImage = "/Themes/LightBingImageTheme.xaml"; 15 | public const string DarkBingImage = "/Themes/DarkBingImageTheme.xaml"; 16 | public const string Windows10 = "/Themes/Windows10Theme.xaml"; 17 | public const string MacOSX = "/Themes/MacOSXTheme.xaml"; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/DynamicModules/DM.Demo.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {EFDBFC84-CFA2-4AB2-A94F-9A3CC58E091F} 8 | WinExe 9 | Properties 10 | DM.Demo 11 | DM.Demo 12 | v4.5.2 13 | 512 14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15 | 4 16 | true 17 | 18 | 19 | AnyCPU 20 | true 21 | full 22 | false 23 | ..\bin\Debug\ 24 | DEBUG;TRACE 25 | prompt 26 | 4 27 | 28 | 29 | AnyCPU 30 | pdbonly 31 | true 32 | ..\bin\Release\ 33 | TRACE 34 | prompt 35 | 4 36 | 37 | 38 | dm.ico 39 | 40 | 41 | 42 | ..\packages\Unity.5.8.13\lib\net45\CommonServiceLocator.dll 43 | 44 | 45 | ..\packages\ModernUI.WPF.1.0.9\lib\net45\FirstFloor.ModernUI.dll 46 | 47 | 48 | ..\packages\Prism.Core.7.1.0.431\lib\net45\Prism.dll 49 | 50 | 51 | ..\packages\Prism.Unity.7.1.0.431\lib\net45\Prism.Unity.Wpf.dll 52 | 53 | 54 | ..\packages\Prism.Wpf.7.1.0.431\lib\net45\Prism.Wpf.dll 55 | 56 | 57 | 58 | 59 | 60 | ..\packages\Prism.Wpf.7.1.0.431\lib\net45\System.Windows.Interactivity.dll 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 4.0 70 | 71 | 72 | ..\packages\Unity.Abstractions.3.3.1\lib\net45\Unity.Abstractions.dll 73 | 74 | 75 | ..\packages\Unity.5.8.13\lib\net45\Unity.Configuration.dll 76 | 77 | 78 | ..\packages\Unity.Container.5.8.13\lib\net45\Unity.Container.dll 79 | 80 | 81 | ..\packages\Unity.5.8.13\lib\net45\Unity.Interception.dll 82 | 83 | 84 | ..\packages\Unity.5.8.13\lib\net45\Unity.Interception.Configuration.dll 85 | 86 | 87 | ..\packages\Unity.5.8.13\lib\net45\Unity.RegistrationByConvention.dll 88 | 89 | 90 | ..\packages\Unity.5.8.13\lib\net45\Unity.ServiceLocation.dll 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | MSBuild:Compile 99 | Designer 100 | 101 | 102 | 103 | 104 | DataGrid.xaml 105 | 106 | 107 | IntroductionView.xaml 108 | 109 | 110 | LoremIpsum3.xaml 111 | 112 | 113 | LoremIpsum2.xaml 114 | 115 | 116 | LoremIpsum1.xaml 117 | 118 | 119 | SettingsAppearance.xaml 120 | 121 | 122 | 123 | 124 | MUIView.xaml 125 | 126 | 127 | LoremIpsumView.xaml 128 | 129 | 130 | SettingsView.xaml 131 | 132 | 133 | MSBuild:Compile 134 | Designer 135 | 136 | 137 | MSBuild:Compile 138 | Designer 139 | 140 | 141 | MSBuild:Compile 142 | Designer 143 | 144 | 145 | MSBuild:Compile 146 | Designer 147 | 148 | 149 | MSBuild:Compile 150 | Designer 151 | 152 | 153 | MSBuild:Compile 154 | Designer 155 | 156 | 157 | MSBuild:Compile 158 | Designer 159 | 160 | 161 | MSBuild:Compile 162 | Designer 163 | 164 | 165 | MSBuild:Compile 166 | Designer 167 | 168 | 169 | MSBuild:Compile 170 | Designer 171 | 172 | 173 | App.xaml 174 | Code 175 | 176 | 177 | Shell.xaml 178 | Code 179 | 180 | 181 | Designer 182 | MSBuild:Compile 183 | 184 | 185 | MSBuild:Compile 186 | Designer 187 | 188 | 189 | MSBuild:Compile 190 | Designer 191 | 192 | 193 | MSBuild:Compile 194 | Designer 195 | 196 | 197 | MSBuild:Compile 198 | Designer 199 | 200 | 201 | MSBuild:Compile 202 | Designer 203 | 204 | 205 | MSBuild:Compile 206 | Designer 207 | 208 | 209 | MSBuild:Compile 210 | Designer 211 | 212 | 213 | 214 | 215 | Code 216 | 217 | 218 | True 219 | True 220 | Resources.resx 221 | 222 | 223 | True 224 | Settings.settings 225 | True 226 | 227 | 228 | ResXFileCodeGenerator 229 | Resources.Designer.cs 230 | 231 | 232 | 233 | SettingsSingleFileGenerator 234 | Settings.Designer.cs 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | {085a3767-0f46-4923-8eb5-596ce276fc47} 250 | DM.Core 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 267 | -------------------------------------------------------------------------------- /src/DynamicModules/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // La información general de un ensamblado se controla mediante el siguiente 8 | // conjunto de atributos. Cambie estos valores de atributo para modificar la información 9 | // asociada con un ensamblado. 10 | [assembly: AssemblyTitle("Dynamic Modules")] 11 | [assembly: AssemblyDescription("Dynamic Modules in WPF with Prism and the Modern UI for WPF toolkit")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("Rubén Hinojosa Chapel")] 14 | [assembly: AssemblyProduct("Dynamic Modules")] 15 | [assembly: AssemblyCopyright("Copyright © 2016 by Rubén Hinojosa Chapel")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles 20 | // para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde 21 | // COM, establezca el atributo ComVisible en true en este tipo. 22 | [assembly: ComVisible(false)] 23 | 24 | //Para comenzar a compilar aplicaciones que se puedan traducir, establezca 25 | //CultureYouAreCodingWith en el archivo .csproj 26 | //dentro de . Por ejemplo, si utiliza inglés de EE.UU. 27 | //en los archivos de código fuente, establezca en en-US. A continuación, quite la marca de comentario 28 | //del atributo NeutralResourceLanguage. Actualice "en-US" en 29 | //la siguiente línea para que coincida con el valor UICulture del archivo de proyecto. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //donde se encuentran los diccionarios de recursos específicos del tema 36 | //(se utiliza si no se encuentra ningún recurso en la página 37 | // ni diccionarios de recursos de la aplicación) 38 | ResourceDictionaryLocation.SourceAssembly //donde se encuentra el diccionario de recursos genérico 39 | //(se utiliza si no se encuentra ningún recurso en la página, 40 | // aplicación o diccionarios de recursos específicos del tema) 41 | )] 42 | 43 | 44 | // La información de versión de un ensamblado consta de los cuatro valores siguientes: 45 | // 46 | // Versión principal 47 | // Versión secundaria 48 | // Número de compilación 49 | // Revisión 50 | // 51 | // Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión 52 | // mediante el carácter '*', como se muestra a continuación: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /src/DynamicModules/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Este código fue generado por una herramienta. 4 | // Versión de runtime:4.0.30319.42000 5 | // 6 | // Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si 7 | // se vuelve a generar el código. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DM.Demo.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// Clase de recurso fuertemente tipado, para buscar cadenas traducidas, etc. 17 | /// 18 | // StronglyTypedResourceBuilder generó automáticamente esta clase 19 | // a través de una herramienta como ResGen o Visual Studio. 20 | // Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen 21 | // con la opción /str o recompile su proyecto de VS. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DM.Demo.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las 51 | /// búsquedas de recursos mediante esta clase de recurso fuertemente tipado. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/DynamicModules/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /src/DynamicModules/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Este código fue generado por una herramienta. 4 | // Versión de runtime:4.0.30319.42000 5 | // 6 | // Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si 7 | // se vuelve a generar el código. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DM.Demo.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/DynamicModules/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/DynamicModules/Shell.xaml: -------------------------------------------------------------------------------- 1 |  16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/DynamicModules/Shell.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using FirstFloor.ModernUI.Windows.Controls; 3 | using FirstFloor.ModernUI.Presentation; 4 | using DM.Demo.Constants; 5 | using DM.Demo.Views; 6 | 7 | namespace DM.Demo 8 | { 9 | public partial class Shell : ModernWindow 10 | { 11 | public Shell() 12 | { 13 | InitializeComponent(); 14 | AppearanceManager.Current.ThemeSource = new Uri(ThemesPath.DM, UriKind.Relative); 15 | } 16 | 17 | public void AddLinkGroups(LinkGroupCollection linkGroupCollection) 18 | { 19 | CreateMenuLinkGroup(); 20 | 21 | foreach (LinkGroup linkGroup in linkGroupCollection) 22 | { 23 | this.MenuLinkGroups.Add(linkGroup); 24 | } 25 | } 26 | 27 | private void CreateMenuLinkGroup() 28 | { 29 | this.MenuLinkGroups.Clear(); 30 | 31 | LinkGroup linkGroup = new LinkGroup 32 | { 33 | DisplayName = "Settings", 34 | GroupKey = "settings" 35 | }; 36 | 37 | linkGroup.Links.Add(new Link 38 | { 39 | DisplayName = "Settings options", 40 | Source = GetUri(typeof(SettingsView)) 41 | }); 42 | 43 | this.MenuLinkGroups.Add(linkGroup); 44 | 45 | linkGroup = new LinkGroup 46 | { 47 | DisplayName = "Common" 48 | }; 49 | 50 | linkGroup.Links.Add(new Link 51 | { 52 | DisplayName = "Dynamic Modules", 53 | Source = GetUri(typeof(IntroductionView)) 54 | }); 55 | 56 | linkGroup.Links.Add(new Link 57 | { 58 | DisplayName = "Modern UI for WPF", 59 | Source = GetUri(typeof(MUIView)) 60 | }); 61 | 62 | linkGroup.Links.Add(new Link 63 | { 64 | DisplayName = "Data Grid", 65 | Source = GetUri(typeof(DataGrid)) 66 | }); 67 | 68 | linkGroup.Links.Add(new Link 69 | { 70 | DisplayName = "Lorem Ipsum", 71 | Source = GetUri(typeof(LoremIpsumView)) 72 | }); 73 | 74 | this.MenuLinkGroups.Add(linkGroup); 75 | } 76 | 77 | private Uri GetUri(Type viewType) 78 | { 79 | return new Uri($"/Views/{viewType.Name}.xaml", UriKind.Relative); 80 | } 81 | } 82 | } -------------------------------------------------------------------------------- /src/DynamicModules/Styles/CustomUI.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 16 7 | 16.333 8 | 9 | 1024 10 | 11 | -------------------------------------------------------------------------------- /src/DynamicModules/Themes/BingImage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Net.Http; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows; 9 | using System.Windows.Controls; 10 | using System.Windows.Media; 11 | using System.Windows.Media.Imaging; 12 | using System.Xml.Linq; 13 | using System.Xml.XPath; 14 | 15 | namespace DM.Demo.Themes 16 | { 17 | /// 18 | /// Provides an attached property determining the current Bing image and assigning it to an image or imagebrush. 19 | /// 20 | public static class BingImage 21 | { 22 | public static readonly DependencyProperty UseBingImageProperty = DependencyProperty.RegisterAttached("UseBingImage", typeof(bool), typeof(BingImage), new PropertyMetadata(OnUseBingImageChanged)); 23 | 24 | private static BitmapImage cachedBingImage; 25 | 26 | private static async void OnUseBingImageChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) 27 | { 28 | var newValue = (bool)e.NewValue; 29 | var image = o as Image; 30 | var imageBrush = o as ImageBrush; 31 | 32 | if (!newValue || (image == null && imageBrush == null)) { 33 | return; 34 | } 35 | 36 | if (cachedBingImage == null) { 37 | var url = await GetCurrentBingImageUrl(); 38 | if (url != null) { 39 | cachedBingImage = new BitmapImage(url); 40 | } 41 | } 42 | 43 | if (cachedBingImage != null){ 44 | if (image != null) { 45 | image.Source = cachedBingImage; 46 | } 47 | else if (imageBrush != null) { 48 | imageBrush.ImageSource = cachedBingImage; 49 | } 50 | } 51 | } 52 | 53 | private static async Task GetCurrentBingImageUrl() 54 | { 55 | var client = new HttpClient(); 56 | var result = await client.GetAsync("http://www.bing.com/hpimagearchive.aspx?format=xml&idx=0&n=2&mbl=1&mkt=en-ww"); 57 | if (result.IsSuccessStatusCode) { 58 | using (var stream = await result.Content.ReadAsStreamAsync()) { 59 | var doc = XDocument.Load(stream); 60 | 61 | var url = (string)doc.XPathSelectElement("/images/image/url"); 62 | 63 | return new Uri(string.Format(CultureInfo.InvariantCulture, "http://bing.com{0}", url), UriKind.Absolute); 64 | } 65 | } 66 | 67 | return null; 68 | } 69 | 70 | 71 | public static bool GetUseBingImage(DependencyObject o) 72 | { 73 | return (bool)o.GetValue(UseBingImageProperty); 74 | } 75 | 76 | public static void SetUseBingImage(DependencyObject o, bool value) 77 | { 78 | o.SetValue(UseBingImageProperty, value); 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/DynamicModules/Themes/DMTheme.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | 9 | #a20025 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/DynamicModules/Themes/DarkBingImageTheme.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/DynamicModules/Themes/DarkTheme.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | 9 | #1ba1e2 10 | 11 | -------------------------------------------------------------------------------- /src/DynamicModules/Themes/LightBingImageTheme.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/DynamicModules/Themes/LightTheme.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | 9 | #1ba1e2 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/DynamicModules/Themes/MacOSXTheme.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | 9 | #d80073 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/DynamicModules/Themes/Windows10Theme.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | 9 | #0082AD 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/DynamicModules/Themes/background.macosx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hinojosachapel/DynamicModules/50ba7e3e81f97896264a79624b7e88f5c6519907/src/DynamicModules/Themes/background.macosx.jpg -------------------------------------------------------------------------------- /src/DynamicModules/Themes/background.windows10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hinojosachapel/DynamicModules/50ba7e3e81f97896264a79624b7e88f5c6519907/src/DynamicModules/Themes/background.windows10.jpg -------------------------------------------------------------------------------- /src/DynamicModules/Themes/dm-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hinojosachapel/DynamicModules/50ba7e3e81f97896264a79624b7e88f5c6519907/src/DynamicModules/Themes/dm-logo.png -------------------------------------------------------------------------------- /src/DynamicModules/ViewModels/DataGridViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | using Prism.Mvvm; 3 | using DM.Core.Model; 4 | using DM.Core.Services; 5 | 6 | namespace DM.Demo.ViewModels 7 | { 8 | public class DataGridViewModel : BindableBase 9 | { 10 | private ObservableCollection customers; 11 | public ObservableCollection Customers 12 | { 13 | get { return customers; } 14 | set { SetProperty(ref customers, value); } 15 | } 16 | 17 | public DataGridViewModel(ICustomerService service) 18 | { 19 | Customers = new ObservableCollection(); 20 | Customers.AddRange(service.GetAllCustomers()); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/DynamicModules/ViewModels/SettingsAppearanceViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.Linq; 4 | using System.Windows; 5 | using System.Windows.Media; 6 | using Prism.Mvvm; 7 | using FirstFloor.ModernUI.Presentation; 8 | using DM.Demo.Constants; 9 | 10 | namespace DM.Demo.ViewModels 11 | { 12 | /// 13 | /// A simple view model for configuring theme, font and accent colors. 14 | /// 15 | public class SettingsAppearanceViewModel : BindableBase 16 | { 17 | private const string FontSmall = "small"; 18 | private const string FontLarge = "large"; 19 | 20 | // 20 accent colors from Windows Phone 8 21 | private Color[] wpAccentColors = new Color[]{ 22 | Color.FromRgb(0xa4, 0xc4, 0x00), // lime 23 | Color.FromRgb(0x60, 0xa9, 0x17), // green 24 | Color.FromRgb(0x00, 0x8a, 0x00), // emerald 25 | Color.FromRgb(0x00, 0xab, 0xa9), // teal 26 | Color.FromRgb(0x1b, 0xa1, 0xe2), // cyan 27 | Color.FromRgb(0x00, 0x50, 0xef), // cobalt 28 | Color.FromRgb(0x6a, 0x00, 0xff), // indigo 29 | Color.FromRgb(0xaa, 0x00, 0xff), // violet 30 | Color.FromRgb(0xf4, 0x72, 0xd0), // pink 31 | Color.FromRgb(0xd8, 0x00, 0x73), // magenta 32 | Color.FromRgb(0xa2, 0x00, 0x25), // crimson 33 | Color.FromRgb(0xe5, 0x14, 0x00), // red 34 | Color.FromRgb(0xfa, 0x68, 0x00), // orange 35 | Color.FromRgb(0xf0, 0xa3, 0x0a), // amber 36 | Color.FromRgb(0xe3, 0xc8, 0x00), // yellow 37 | Color.FromRgb(0x82, 0x5a, 0x2c), // brown 38 | Color.FromRgb(0x6d, 0x87, 0x64), // olive 39 | Color.FromRgb(0x64, 0x76, 0x87), // steel 40 | Color.FromRgb(0x76, 0x60, 0x8a), // mauve 41 | Color.FromRgb(0x87, 0x79, 0x4e), // taupe 42 | }; 43 | 44 | private Color selectedAccentColor; 45 | private LinkCollection themes = new LinkCollection(); 46 | private Link selectedTheme; 47 | private string selectedFontSize; 48 | 49 | public SettingsAppearanceViewModel() 50 | { 51 | // add the default themes 52 | //this.themes.Add(new Link { DisplayName = "light", Source = AppearanceManager.LightThemeSource }); 53 | //this.themes.Add(new Link { DisplayName = "dark", Source = AppearanceManager.DarkThemeSource }); 54 | 55 | // add additional themes 56 | this.themes.Add(new Link { DisplayName = "dynamic modules", Source = new Uri(ThemesPath.DM, UriKind.Relative) }); 57 | this.themes.Add(new Link { DisplayName = "light", Source = new Uri(ThemesPath.Light, UriKind.Relative) }); 58 | this.themes.Add(new Link { DisplayName = "dark", Source = new Uri(ThemesPath.Dark, UriKind.Relative) }); 59 | this.themes.Add(new Link { DisplayName = "light bing image", Source = new Uri(ThemesPath.LightBingImage, UriKind.Relative) }); 60 | this.themes.Add(new Link { DisplayName = "dark bing image", Source = new Uri(ThemesPath.DarkBingImage, UriKind.Relative) }); 61 | this.themes.Add(new Link { DisplayName = "windows 10", Source = new Uri(ThemesPath.Windows10, UriKind.Relative) }); 62 | this.themes.Add(new Link { DisplayName = "mac osx", Source = new Uri(ThemesPath.MacOSX, UriKind.Relative) }); 63 | 64 | this.SelectedFontSize = AppearanceManager.Current.FontSize == FontSize.Large ? FontLarge : FontSmall; 65 | SyncThemeAndColor(); 66 | 67 | AppearanceManager.Current.PropertyChanged += OnAppearanceManagerPropertyChanged; 68 | } 69 | 70 | private void SyncThemeAndColor() 71 | { 72 | // synchronizes the selected viewmodel theme with the actual theme used by the appearance manager. 73 | this.SelectedTheme = this.themes.FirstOrDefault(l => l.Source.Equals(AppearanceManager.Current.ThemeSource)); 74 | 75 | // and make sure accent color is up-to-date 76 | this.SelectedAccentColor = AppearanceManager.Current.AccentColor; 77 | } 78 | 79 | private void OnAppearanceManagerPropertyChanged(object sender, PropertyChangedEventArgs e) 80 | { 81 | if (e.PropertyName == "ThemeSource" || e.PropertyName == "AccentColor") 82 | { 83 | SyncThemeAndColor(); 84 | } 85 | } 86 | 87 | public LinkCollection Themes 88 | { 89 | get { return this.themes; } 90 | } 91 | 92 | public string[] FontSizes 93 | { 94 | get { return new string[] { FontSmall, FontLarge }; } 95 | } 96 | 97 | public Color[] AccentColors 98 | { 99 | get { return this.wpAccentColors; } 100 | } 101 | 102 | public Link SelectedTheme 103 | { 104 | get { return this.selectedTheme; } 105 | set 106 | { 107 | if (this.selectedTheme != value) 108 | { 109 | SetProperty(ref selectedTheme, value); 110 | 111 | // and update the actual theme 112 | AppearanceManager.Current.ThemeSource = value.Source; 113 | } 114 | } 115 | } 116 | 117 | public string SelectedFontSize 118 | { 119 | get { return this.selectedFontSize; } 120 | set 121 | { 122 | if (this.selectedFontSize != value) 123 | { 124 | SetProperty(ref selectedFontSize, value); 125 | 126 | //AppearanceManager.Current.FontSize = value == FontLarge ? FontSize.Large : FontSize.Small; 127 | //RH 128 | Application.Current.Resources[AppearanceManager.KeyDefaultFontSize] = value == FontSmall ? 13D : 16D; 129 | Application.Current.Resources[AppearanceManager.KeyFixedFontSize] = value == FontSmall ? 12.667D : 16.333D; 130 | } 131 | } 132 | } 133 | 134 | public Color SelectedAccentColor 135 | { 136 | get { return this.selectedAccentColor; } 137 | set 138 | { 139 | if (this.selectedAccentColor != value) 140 | { 141 | SetProperty(ref selectedAccentColor, value); 142 | AppearanceManager.Current.AccentColor = value; 143 | } 144 | } 145 | } 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/DataGrid.xaml: -------------------------------------------------------------------------------- 1 |  13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/DataGrid.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace DM.Demo.Views 4 | { 5 | /// 6 | /// Interaction logic for DataGrid.xaml 7 | /// 8 | public partial class DataGrid : UserControl 9 | { 10 | public DataGrid() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/IntroductionView.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/IntroductionView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace DM.Demo.Views 17 | { 18 | /// 19 | /// Interaction logic for IntroductionView.xaml 20 | /// 21 | public partial class IntroductionView : UserControl 22 | { 23 | public IntroductionView() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/LoremIpsum1.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/LoremIpsum1.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace DM.Demo.Views 17 | { 18 | /// 19 | /// Interaction logic for LoremIpsum1.xaml 20 | /// 21 | public partial class LoremIpsum1 : UserControl 22 | { 23 | public LoremIpsum1() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/LoremIpsum2.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/LoremIpsum2.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace DM.Demo.Views 17 | { 18 | /// 19 | /// Interaction logic for LoremIpsum2.xaml 20 | /// 21 | public partial class LoremIpsum2 : UserControl 22 | { 23 | public LoremIpsum2() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/LoremIpsum3.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/LoremIpsum3.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace DM.Demo.Views 17 | { 18 | /// 19 | /// Interaction logic for LoremIpsum3.xaml 20 | /// 21 | public partial class LoremIpsum3 : UserControl 22 | { 23 | public LoremIpsum3() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/LoremIpsumView.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/LoremIpsumView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace DM.Demo.Views 17 | { 18 | /// 19 | /// Interaction logic for LoremIpsumView.xaml 20 | /// 21 | public partial class LoremIpsumView : UserControl 22 | { 23 | public LoremIpsumView() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/MUIView.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/MUIView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace DM.Demo.Views 17 | { 18 | /// 19 | /// Interaction logic for MUIView.xaml 20 | /// 21 | public partial class MUIView : UserControl 22 | { 23 | public MUIView() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/SettingsAppearance.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 49 | 50 | 51 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/SettingsAppearance.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | using FirstFloor.ModernUI.Presentation; 16 | using DM.Demo.ViewModels; 17 | 18 | namespace DM.Demo.Views 19 | { 20 | /// 21 | /// Interaction logic for SettingsAppearance.xaml 22 | /// 23 | public partial class SettingsAppearance : UserControl 24 | { 25 | public SettingsAppearance() 26 | { 27 | InitializeComponent(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/SettingsView.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/DynamicModules/Views/SettingsView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace DM.Demo.Views 17 | { 18 | /// 19 | /// Interaction logic for SettingsView.xaml 20 | /// 21 | public partial class SettingsView : UserControl 22 | { 23 | public SettingsView() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/DynamicModules/dm.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hinojosachapel/DynamicModules/50ba7e3e81f97896264a79624b7e88f5c6519907/src/DynamicModules/dm.ico -------------------------------------------------------------------------------- /src/DynamicModules/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | --------------------------------------------------------------------------------