prism-4

DataTemplate to generate Menu with MVVM

十年热恋 提交于 2019-12-03 03:57:08
I'm trying to use a DataTemplate to create a Menu from my ViewModels with respect to MVVM. Basically, I've created several classes which will store information about my Menu structure. I then want to realize that menu stucture as a WPF Menu using a DataTemplate. I have a menu service which allows different components to register new menus and items within the menus. Here's how I've organized my menu information (ViewModel) I have the following classes: MainMenuViewModel - Contains a TopLevelMenuViewModelCollection (a collection of top level menus) TopLevelMenuViewModel - Contains a

PRISM + MEF + MVVM — Not sure where to really start?

假如想象 提交于 2019-12-03 01:27:53
What I'm using: Visual Studio 2010 Microsoft .NET Framework 4 Prism v4 What I am trying to figure out is how to get started with Prism + MEF while maintaining the MVVM pattern. When I go into the Prism Quickstarts, it has a Prism + MEF, but the comments in the project specifically state that the Quickstart example does not implement MVVM. I'm not really sure what to mix/match so that my shell itself follows MVVM (and regions). Basically, I want to use MEF to be able to load Assemblies (Modules) at run-time. And, I want to setup regions in my Shell and have the Shell use MVVM (so I can databind

DataTemplate x:Shared=false has no impact on the view

℡╲_俬逩灬. 提交于 2019-11-30 21:44:48
I am using datatemplate to load my views using PRISM 4 discovery. I have a need to create the view/viewmodel multiple times rather than reuse existing instances so I set x:Shared=false in the resource but it only has impact on the viewmodel. I can confirm that the viewmodel is not reused but the view is. The view constructor is only called once the first time it is called. I have read similar posts here but their solutions did not work for me. I want to know if I can some how extend the resource loader/locator and make sure it respects the Shared flag. Here is how my template is defined:

How to Learn Prism for Silverlight Fast?

这一生的挚爱 提交于 2019-11-30 16:35:46
I need to make Silverlight application With Prism. What could be best way to learn to make simple application with Silverlight + Prism? Also suggest any Good books for same. Thanks. Great book, I started with this book myself: Developer’s Guide to Microsoft® Prism 4: Building Modular MVVM Applications with Windows® Presentation Foundation and Microsoft Silverlight® I also have the book mentioned by 'daageu', and would also recommend it. But to accelerate the process of learning Prism even faster, I recommend the video series presented by Mike Taulty and available for free on Channel 9 . It's a

DataTemplate x:Shared=false has no impact on the view

扶醉桌前 提交于 2019-11-30 05:43:30
问题 I am using datatemplate to load my views using PRISM 4 discovery. I have a need to create the view/viewmodel multiple times rather than reuse existing instances so I set x:Shared=false in the resource but it only has impact on the viewmodel. I can confirm that the viewmodel is not reused but the view is. The view constructor is only called once the first time it is called. I have read similar posts here but their solutions did not work for me. I want to know if I can some how extend the

How to Learn Prism for Silverlight Fast?

旧巷老猫 提交于 2019-11-29 23:48:45
问题 I need to make Silverlight application With Prism. What could be best way to learn to make simple application with Silverlight + Prism? Also suggest any Good books for same. Thanks. 回答1: Great book, I started with this book myself: Developer’s Guide to Microsoft® Prism 4: Building Modular MVVM Applications with Windows® Presentation Foundation and Microsoft Silverlight® 回答2: I also have the book mentioned by 'daageu', and would also recommend it. But to accelerate the process of learning

How do I bind a TabControl to a collection of ViewModels?

↘锁芯ラ 提交于 2019-11-26 00:47:43
问题 Basically I have in my MainViewModel.cs: ObservableCollection<TabItem> MyTabs { get; private set; } However, I need to somehow be able to not only create the tabs, but have the tabs content be loaded and linked to their appropriate viewmodels while maintaining MVVM. Basically, how can I get a usercontrol to be loaded as the content of a tabitem AND have that usercontrol wired up to an appropriate viewmodel. The part that makes this difficult is the ViewModel is not supposed to construct the