prism

Compile time error when styling BaseView like LoadingDecorator

岁酱吖の 提交于 2019-12-25 14:10:08
问题 For instance I have the next code for my BaseView: using System.Windows; using DevExpress.Xpf.Core; namespace Infrastructure.BaseView { public class BaseView : LoadingDecorator { public BaseView() { Style = FindResource("BaseViewStyle") as Style; } } } Style: <Style TargetType="{x:Type baseView:BaseView}" x:Key="BaseViewStyle" > <Setter Property="OwnerLock" Value="InputOnly"/> <Style.Triggers> <DataTrigger Binding="{Binding State}" d:DataContext="{d:DesignInstance Type=baseViewModel

Can I set text-wrapping mode for a long-text mesage to transfer the text to the next line in Prism 6.2. modal dialog?

那年仲夏 提交于 2019-12-25 09:01:43
问题 Sometimes the text of notification message for modal dialog is very long as you can see on the figure below.This is not custom modal dialog but simple notification modal dialog which has a very long text mesage. This is the exception error-message produced by MODBUS protocol library that I use in my application. But SQL Server exceptions can also have such very long text messages about errors. By default, Prism 6.2 modal notification dialod displays a none-wrapped text. As a result of it, the

Initialize hierarchical tree viewmodels with unity

↘锁芯ラ 提交于 2019-12-25 07:44:47
问题 I'm investigating a change in our application to use Prism. At the moment I'm struggling with the initialization of hierarchical structures. Basically I have a base class of which other classes inherit, simplified like this: public class NodeViewModel : INodeViewModel { Node Node { get; private set; } public ObservableCollection<INodeViewModel> ChildNodeViewModels { get; private set; } public NodeViewModel(IUnityContainer container, Node node) { Node = node; ChildNodeViewModels = new

Errors with installing Prism in visual studio

二次信任 提交于 2019-12-25 07:25:35
问题 I am attempting to use the Microsoft.Practices.Prism library in a universal windows phone/windows 8.1 app in Visual studio 2013. It was working great for the first day. Today when I logged in my build would fail because it claimed it did not have a reference to Microsoft.Practices, however intellisense would pick up both Microsoft.Practices and Microsoft.Practices.Prism. So I uninstalled Prism using nuget package manager, then reinstalled it. Now I am getting this error. I have seen posts

A value of type 'PopupWindowAction' cannot be added to a collection or dictionary of type 'TriggerActionCollection'

醉酒当歌 提交于 2019-12-25 06:38:34
问题 Refer to Prism manual I made my modal view and pasted it in main view like this: <baseView:BaseView ... > <i:Interaction.Triggers> <prism:InteractionRequestTrigger SourceObject="{Binding DocumentSelectionRequest, Mode=OneWay}"> <prism:PopupWindowAction IsModal="True"> <prism:PopupWindowAction.WindowContent> <modal:DocumentSelectionView /> </prism:PopupWindowAction.WindowContent> </prism:PopupWindowAction> </prism:InteractionRequestTrigger> </i:Interaction.Triggers> <Grid> ... </Grid> <

Unity & Prism Modularity - Load problems

随声附和 提交于 2019-12-25 05:05:19
问题 I need your help again please. I am working on a application with a modular concept. I want to use Prism and Unity for it. I have looked at the quickstart example from Prism and I also read this article on MSDN. My actual code looks like: public class Bootstrapper : UnityBootstrapper { protected override DependencyObject CreateShell() { return this.Container.Resolve<Shell>(); } protected override void InitializeShell() { base.InitializeShell(); var window = this.Shell as Window; if (window !=

Unity & Prism Modularity - Load problems

牧云@^-^@ 提交于 2019-12-25 05:05:13
问题 I need your help again please. I am working on a application with a modular concept. I want to use Prism and Unity for it. I have looked at the quickstart example from Prism and I also read this article on MSDN. My actual code looks like: public class Bootstrapper : UnityBootstrapper { protected override DependencyObject CreateShell() { return this.Container.Resolve<Shell>(); } protected override void InitializeShell() { base.InitializeShell(); var window = this.Shell as Window; if (window !=

Prism and MVVM databinding from modules to main shell datacontext

二次信任 提交于 2019-12-25 04:57:29
问题 Have some experience with WPF and databinding, but completely new to PRISM and MVVM. I'm working on Prism application where I have a shell and multiple modules. In my previous WPF application I had a single window datacontext (with all objects I need) which I could then simply databind from any usercontrol inside my window. In the context of the Prism, what is the proper way to have a single datacontext, let's we call it ShellViewModel and then for all modules to bind to its' objects and

Changing host WinForm properties from ViewModel bound to ElementHost

跟風遠走 提交于 2019-12-25 01:23:49
问题 Can anyone suggest approaches that will allow me to change the properties of a host WinForm from a WPF element in an ElementHost? I have an MVVM application using Prism that's bound to an ElementHost. I would like to change the WinForm title, resize the WinForm and close the WinForm from within my ViewModel. I understand receiving data from a WPF composite control described in this article but I can't see how that will work in a ViewModel. App is the WinForm ChartWizardViewModel is the

Can someone explain the magic going on in Prism's resolve<> method?

て烟熏妆下的殇ゞ 提交于 2019-12-24 23:15:09
问题 I've got a CustomersModule.cs with the following Initialize() method: public void Initialize() { container.RegisterType<ICustomersRepository, CustomersRepository>(new ContainerControlledLifetimeManager()); CustomersPresenter customersPresenter = this.container.Resolve<CustomersPresenter>(); } The class I resolve from the container looks like this: class CustomersPresenter { private CustomersView view; private ICustomersRepository customersRespository; public CustomersPresenter(CustomersView