prism

WPF Prism Request Navigate activation error

元气小坏坏 提交于 2019-12-23 01:37:12
问题 Referring the StockTraderRI, I created a popup region in my shell infBehaviors:RegionPopupBehaviors.CreatePopupRegionWithName="{x:Static inf:RegionNames.SecondaryRegion}" In the module I am trying to load the view to the popup _regionManager.RequestNavigate(RegionNames.SecondaryRegion, new Uri("/OrderDetailsView", UriKind.Relative)); OrderDetailsView is a view within OrderDetailsModule. At this point I am getting the below error Activation error occurred while trying to get instance of type

WPF Datagrid group expander text - how to bind?

天涯浪子 提交于 2019-12-22 18:28:23
问题 I am using a datagrid with a combox that should change the grouping field. I am using the following xaml to define the general grouping template : <DataGrid.GroupStyle> <GroupStyle> <GroupStyle.ContainerStyle> <Style TargetType="{x:Type GroupItem}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type GroupItem}"> <Expander> <Expander.Header> <StackPanel Orientation="Horizontal"> <TextBlock Text="NEEDS TO BE BINDED..."/> </StackPanel> </Expander.Header>

Can parameters be passed to a WPF user control?

跟風遠走 提交于 2019-12-22 17:51:27
问题 Can values or parameters be passed to a WPF user control? I am using MVVM pattern. <local:SampleUserControlView Forecolor="{Binding ForeColor}"/> where ForeColor is a property of Type Color or Brush in Viewmodel of the window hosting SampleUserControl View. By the way, should the property be of type Color or Brush? 回答1: yes you can pass by using dependency properties . You can create dependency property in your usercontrol of type what you want to pass. Below is a small example which will

How to recomposit empty DirectoryCatalog for MEF in WPF

和自甴很熟 提交于 2019-12-22 14:00:45
问题 I have an application with these step: startup application and ConfigureAggregateCatalog logon user to app download DLL MEF modules to directory called 'Modules' refresh directory catalog -- there is a problem I have empty directory 'Modules' after download dll i tried to load modules but without succes. There is an error on line where I called DirectoryCatalog.Refresh() System.ComponentModel.Composition.ChangeRejectedException was unhandled by user code Message=The composition remains

WPF Prism: Problem with creating a Shell

核能气质少年 提交于 2019-12-22 11:28:40
问题 I just started learning Prism and trying to use it with MEF in a test WPF application. Based on "WPF Hands-On Lab: Get Started with the Prism Library" example in the Prism4 documentation, in a test WPF project I renamed MainWindow class to Shell . My Bootstrapper class has the following code (also based on the Lab example): class Bootstrapper : MefBootstrapper { protected override DependencyObject CreateShell() { return new Shell(); } protected override void InitializeShell() { Application

WPF MEF + Prism initial Region loading

╄→гoц情女王★ 提交于 2019-12-22 10:56:46
问题 I have written an MVVM app in WPF using MEF and Prism with three different regions. Code is across two modules, being discovered in the App.Config. I have all the navigation commands and structure working perfectly fine, but the one thing I am confused on is how to set the initial Views loaded into each region at app startup as there seems to be nowhere I can do this. Furthermore if I add something to the end of the MainViewModel constructor to explicitly navigate to screen set A, something

How to register modules in Prism 6 WPF application with view-switching navigation?

心已入冬 提交于 2019-12-22 00:37:18
问题 I begin develop Prism 6 WPF view-switching application in MSVS 2015 Professional (russified). Below is my solution representation (I bag your pardon for Russian in my MSVS): Below is Bootstrepper of my application: class Bootstrapper : UnityBootstrapper { protected override DependencyObject CreateShell() { return Container.Resolve<MainWindow>(); } protected override void InitializeShell() { Application.Current.MainWindow.Show(); } } Both of my modules must be loaded with the application and

How to use ReactiveUI inside a PRISM module

烂漫一生 提交于 2019-12-22 00:27:51
问题 We have an existing WPF application that uses PRISM (6.x) with Unity (3.5.x) for DI. We are going to be adding more functionality to this application and would like to start utilizing ReactiveUI for any new modules that we need to implement. We were hoping to minimize the learning curve and continue to utilize Unity and DI for our ViewModels; however, ReactiveUI uses Splat for View location and so far I have not been able to get my ReactiveUI module to actually display in a PRISM region

WPF Prism - Manage Modules In Application

拟墨画扇 提交于 2019-12-21 17:58:08
问题 Using Prism with WPF, I want to allow users to select from a repository which modules they'd like to use. Each module is essentially an add-on, and selecting a module to use would just move it into their 'Modules' folder of DLL to load. But, in trying to move DLLs around when the application is running, an error is thrown because the DLLs are in use at that moment. How can you get around this and allow users to Add/Remove modules at will? 回答1: Once an assembly is loaded into an AppDomain , it

WPF Prism - Manage Modules In Application

依然范特西╮ 提交于 2019-12-21 17:58:06
问题 Using Prism with WPF, I want to allow users to select from a repository which modules they'd like to use. Each module is essentially an add-on, and selecting a module to use would just move it into their 'Modules' folder of DLL to load. But, in trying to move DLLs around when the application is running, an error is thrown because the DLLs are in use at that moment. How can you get around this and allow users to Add/Remove modules at will? 回答1: Once an assembly is loaded into an AppDomain , it