prism-5

How to add view to a PRISM TabControl region WITHOUT making it selected?

天涯浪子 提交于 2020-01-26 02:22:49
问题 We have a WPF application using PRISM, with a region of type TabControl. <TabControl prism:RegionManager.RegionName="{x:Static inf:RegionNames.ContentRegion}"> <TabControl.ItemContainerStyle> <Style TargetType="{x:Type TabItem}"> <Setter Property="Header" Value="{Binding TabName}" /> </Style> </TabControl.ItemContainerStyle> </TabControl> And we are registering views with _regionManager.RegisterViewWithRegion(RegionNames.ContentRegion, typeof(ContentView)); Problem is, this way the registered

How to add view to a PRISM TabControl region WITHOUT making it selected?

坚强是说给别人听的谎言 提交于 2020-01-26 02:22:42
问题 We have a WPF application using PRISM, with a region of type TabControl. <TabControl prism:RegionManager.RegionName="{x:Static inf:RegionNames.ContentRegion}"> <TabControl.ItemContainerStyle> <Style TargetType="{x:Type TabItem}"> <Setter Property="Header" Value="{Binding TabName}" /> </Style> </TabControl.ItemContainerStyle> </TabControl> And we are registering views with _regionManager.RegisterViewWithRegion(RegionNames.ContentRegion, typeof(ContentView)); Problem is, this way the registered

Module is not loaded by Prism framework if a type from the same module is used explicitly

荒凉一梦 提交于 2019-12-24 06:32:08
问题 We have a WPF application using prism 5 framework. Modules are loaded using DirectoryModuleCatalog. At the same time if I refer one of the modules in the start up project where bootstrapper is located and use a type from it, that module is skipped from loading. Looks like the prism framework is skipping it as it is already loaded in AppDomain. Is there any way to load the module albeit a type from it is referred in the startup project? 回答1: Sounds like you are only referencing the Module and

ViewModelLocator.AutoWireViewModel - No DataContext for MainWindow

为君一笑 提交于 2019-12-12 03:54:57
问题 MainWindow UI <Window x:Class="PrismSanity.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:prism="http://prismlibrary.com/" prism:ViewModelLocator.AutoWireViewModel="True" mc:Ignorable="d" Title="MainWindow" Height="350" Width="525"> <Grid> <TextBlock Text="{Binding MyName}

How to exchange/replace the shared (singleton) object in MEF container?

若如初见. 提交于 2019-12-10 12:16:23
问题 This may be simple but as I am new to MEF arena that is why I am having some difficulty to figure out the solution to my problem. I am working on an application using WPF + Prism with MEF as DI container. I want to tie my object (i.e. RuleFile ) with each application instance by associating it with the file say RuleFile1.ruleapp. Therefore I have decorated it with attribute [PartCreationPolicy(CreationPolicy.Shared)] to treat it as singleton so that it remains same throughout the application

Prism 5 DelegateCommandBase.RaiseCanExecuteChanged throws InvalidOperationException

耗尽温柔 提交于 2019-12-07 05:26:19
问题 I've just updated from Prism 4.1 to 5 and code that used to work fine now throws InvalidOperationExceptions. I suspect that the root cause is that the updated async DelegateCommands don't marshall to the UI thread properly. I need to be able to call command.RaiseCanExecuteChanged() from any thread and for that to raise the CanExecuteChanged event on the UI thread. The Prism documentation says that that's what the RaiseCanExecuteChanged() method is supposed to do. However, with the Prism 5

Prism 6 compatibility with older versions

拥有回忆 提交于 2019-12-07 05:11:14
问题 I have a solution with a main project that uses Prism 5 (WPF). This solution also contains many more projects that are Prism modules. Now I have to create a new module, and I wonder if I can use Prism 6 only in that module, and it will be compatible with Prism 5 main project, or if I need to continue with Prism 5 in all the modules (or upgrade the entire solution to Prism 6, what is a really big work). Thank you 回答1: You'll have to stick with Prism 5 or upgrade everything to Prism 6. There

Prism 6 compatibility with older versions

青春壹個敷衍的年華 提交于 2019-12-05 09:50:14
I have a solution with a main project that uses Prism 5 (WPF). This solution also contains many more projects that are Prism modules. Now I have to create a new module, and I wonder if I can use Prism 6 only in that module, and it will be compatible with Prism 5 main project, or if I need to continue with Prism 5 in all the modules (or upgrade the entire solution to Prism 6, what is a really big work). Thank you You'll have to stick with Prism 5 or upgrade everything to Prism 6. There are some breaking changes between these versions: Removed all types that were marked as "Obsolete" in Prism 5