Search Results

Search found 10 results on 1 pages for 'prismv2'.

Page 1/1 | 1 

  • mvvm - prismv2 - INotifyPropertyChanged

    - by depictureboy
    Since this is so long and prolapsed and really doesnt ask a coherent question: 1: what is the proper way to implement subproperties of a primary object in a viewmodel? 2: Has anyone found a way to fix the delegatecommand.RaiseCanExecuteChanged issue? or do I need to fix it myself until MS does? For the rest of the story...continue on. In my viewmodel i have a doctor object property that is tied to my Model.Doctor, which is an EF POCO object. I have onPropertyChanged("Doctor") in the setter as such: Private Property Doctor() As Model.Doctor Get Return _objDoctor End Get Set(ByVal Value As Model.Doctor) _objDoctor = Value OnPropertyChanged("Doctor") End Set End Property The only time OnPropertyChanged fires if the WHOLE object changes. This wouldnt be a problem except that I need to know when the properties of doctor changes, so that I can enable other controls on my form(save button for example). I have tried to implement it in this way: Public Property FirstName() As String Get Return _objDoctor.FirstName End Get Set(ByVal Value As String) _objDoctor.FirstName = Value OnPropertyChanged("Doctor") End Set End Property this is taken from the XAMLPowerToys controls from Karl Shifflet, so i have to assume that its correct. But for the life of me I cant get it to work. I have included PRISM in here because I am using a unity container to instantiate my view and it IS a singleton. I am getting change notification to the viewmodel via eventaggregator that then populates Doctor with the new value. The reason I am doing all this is because of PRISM's DelegateCommand. So maybe that is my real issue. It appears that there is a bug in DelegateCommand that does not fire the RaiseCanExecuteChanged method on the commands that implement it and therefore needs to be fired manually. I have the code for that in my onPropertyChangedEventHandler. Of course this isnt implemented through the ICommand interface either so I have to break and make my properties DelegateCommand(of X) so that I have access to RaiseCanExecuteChanged of each command.

    Read the article

  • WPF with MVVM and Prismv2 - Event Bubbling?

    - by depictureboy
    What is the best way to get an event from a child or grandchild module up to the parent Shell? For instance, if I have a view in a module that is actually 2 levels away from the Shell, and I have a Window behavior. Is the eventaggregator really the best way to do this? it seems like overkill. I just want my MainShell to watch for a change in the IsDialogOpen Property on the ViewModels in all my child modules. I feel like I am missing the trees for the forest...

    Read the article

  • Composite WPF and AvalonDock

    - by Vishal
    Hi All, Has anybody tried PRISM and AvalonDock (latest release with DocumentSource property) together? I already had a look at http://www.youdev.net/post/2009/07/17/AvalonDock-Documents.aspx but it just briefs on how to use documentsource property. Please help, if anybody has tried this. I Would like to know 1.How to associate DocumentSource Property with different regions? 2.Can we assign only a collection of DocumentContent to DocumentSource property? What about DockableContent? Thanks & regards, Vishal.

    Read the article

  • Proper implementation of NLog and Prism

    - by WiT8litZ
    What would be the best way to implement NLog in my Prism / CAL WPF application. This might be an amateur question, I am a bit new to the whole Prism framework :) I thought about putting the reference to the NLog dll in the Infrastructure module and make a wrapper singleton class e.g. MyLogger. My thinking was to be able to have the reference to 1 logger implementation somewhere in a central place that everything has reference to, and the only thing that I know of in Prism would be your Infrastructure module. The obvious other way is to add a reference to NLog to each module but I think that would defeat the purpose of decoupling and all of that. Any ideas would be most helpful Regards

    Read the article

  • WPF and Prism View Overlay

    - by Zaheer
    Hi, I need some help with overlaying views using the prism framework.Its a little more complexed than that so let me explain.I could be over-thinking this as well :D i have shell (wpf window) and i have 2 views(A & B - both usercontrols) in a module. when the shell loads it loads view A. On view A i have a button to "popup" view B for some user input. so naturally i would think to some sort of modal window/control, maybe even a popup. however the problem i face with the popup is that when i move the shell the popup remains fixed and it doesnt block events in view A. I've tried disabling view A to stop events being fired and i've also tried to use a to get the view B move with the shell. Only the canvas works but i now need a way to block it tho'. Is there anyway i can overlay a view on top of another view with prism? or how does everyone else create modal popups with prism & wpf? any advise or pointers would be greatly appreciated.

    Read the article

  • PRISM View Injection/Navigation in Same Module

    - by Jeaffrey Gilbert
    This is ModuleInit.cs in Products module public class ModuleInit : IModule { private readonly IUnityContainer _container; private readonly IRegionManager _regionManager; public ModuleInit(IUnityContainer container, IRegionManager regionManager) { _container = container; _regionManager = regionManager; } #region IModule Members public void Initialize() { App app = (App)Application.Current; _regionManager.RegisterViewWithRegion(RegionNames.ModuleRegionProducts, () => _container.Resolve<Views.ProductsCycle>()); } #endregion } Below is button event handler in ProductsCycle.cs to go to another view still within same module: private void btnForward_Click(object sender, RoutedEventArgs e) { IRegion productsRegion = _regionManager.Regions["ModuleRegionProducts"]; var productsListView = _container.Resolve<Views.ProductsList>(); productsRegion.Add(productsListView, "ProductsList"); productsRegion.Activate(productsListView); } State: ProductsCycle page is successfully loaded on first load. Problem: View doesn't changed from ProductCycle page to ProductsList page when btnForward is clicked. I'm using Silverlight 4 and PRISM2. Please your advice, thank you.

    Read the article

  • How to remove Region and add new ContentControls from Module

    - by Jeaffrey Gilbert
    I've set only one region in Shell "LoginRegion" <!-- Login Region --> <Border Grid.Row="0"> <ContentControl x:Name="LoginRegion" Regions:RegionManager.RegionName="LoginRegion" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"/> </Border> And after login succeeded, I need to remove "LoginRegion" and add 3 other regions with new LayoutRoot grid definitions to Shell from code behind in Login module. <Grid.RowDefinitions> <RowDefinition Height="93"/> <RowDefinition /> <RowDefinition Height="24"/> </Grid.RowDefinitions> <!-- Top Region --> <Border Grid.Row="0"> <ContentControl x:Name="TopRegion" Regions:RegionManager.RegionName="TopRegion" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"/> </Border> <!-- Main Region --> <Border Grid.Row="1"> <ContentControl x:Name="MainRegion" Regions:RegionManager.RegionName="MainRegion" Style="{StaticResource TestStyle}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"/> </Border> <!-- Bottom Region --> <Border Grid.Row="2"> <ContentControl x:Name="BottomRegion" Regions:RegionManager.RegionName="BottomRegion" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"/> </Border> Please help, thank you.

    Read the article

  • [PRISM2] Added view does not appear on screen

    - by Jeaffrey Gilbert
    Why my "mainRegion.Activate(view);" doesn't display the view on screen? It only works if I remove the default view that registered (RegisterViewWithRegion) in ModuleInit.cs though I don't put .Activate() after I added a View. But a problem occurs if I move to other module, and get back to module which default view has been removed, I get blank page. Any clues? Thank you. *) I prefer not to remove default view, but only with Activate(view) can show the View I want as explained in my reference. reference: http://msdn.microsoft.com/en-us/library/dd458899.aspx

    Read the article

1