DCSIMG
MVVM - Essential XAML

Browse by Tags

All Tags » MVVM (RSS)

Displaying user Messages, Errors and Dialogs from a ViewModel using a Service – Part 2 by Tomer Shamam

Displaying user Messages, Errors and Dialogs from a ViewModel using a Service – Part 1 In my previous post , I've discussed a bit about using the MVVM pattern and how to display a message or opening a dialog from within the view-model. As part of the discussion, I've shown a possible way for displaying Messages, Errors and even Dialog or Popups. In this post I would like to provide more details about the implementation of the Dialog part. Recall previous post, we have the following two methods...
תגים:, , , , , ,

Displaying user Messages, Errors and Dialogs from a ViewModel using a Service – Part 1 by Tomer Shamam

Displaying user Messages, Errors and Dialogs from a ViewModel using a Service – Part 2 Years after the invention of the MVVM pattern and people are still asking many questions about how to do this and how to do that, and specifically, how to display a Message, Error or even opening a Dialog from a View Model without accessing the view layer or visual tree. If we go straight with the MVVM pattern concept, the view-model must not directly access or manipulate the View/Visual Tree or part of it in any...

MVVM Open House at Sela Group, Haifa by Tomer Shamam

To all of you who participated in the MVVM session today last week, I hope you've enjoyed it and learned something new. It was a great pleasure to speak in front of you. As I promised, here is the presentation . Also here is the Agenda for the 4 days Advanced WPF course at Sela Group.

Implicit DataTemplate in Silverlight 4 Composite UI – Get ready for Silverlight 5 (Part III) by Tomer Shamam

In this post I'll show how did I implemented the ItemsControl implicit data-template using the ImplicitItemsTemplateBehavior attached behavior. But first, lets talk a bit about how WPF searches for an implicit data template, given a collection of items, so we can mimic that behavior in Silverlight. Having an ItemsControl with an ItemsSource property set to a collection of type Shape, WPF looks at the ItemsControl.ItemTemplate. In case that one is missing, and there is no ItemTemplateSelector...

Implicit DataTemplate in Silverlight 4 Composite UI – Get ready for Silverlight 5 (Part II) by Tomer Shamam

In this post I'll show how did I implemented the ContentControl implicit data-template using the ImplicitContentTemplateBehavior attached behavior. But first, lets talk a bit about how WPF searches for an implicit data template, given a content, so we can mimic that behavior in Silverlight.   Having a ContentControl with a Content set to an instance of type Circle, WPF looks at the ControlControl.ItemTemplate. In case that one is missing, and there is no ItemTemplateSelector, it changes...

Implicit DataTemplate in Silverlight 4 Composite UI – Get ready for Silverlight 5 (Part I) by Tomer Shamam

I'm using Prism 4 in one of my Silverlight 4 Composite UI. Working with Prism, there are two ways populating a Region: You can populate it with a UI element, which is the view, or placing the view-model directly. Personally I support the idea that a UI element must not be treated directly from the Application logic, and there should be ZERO UI elements in the Application logic. So natively, populating a region with a view-model instead of a view sounds more reasonable for me. With WPF things...

MVVM Open House at Sela Group by Tomer Shamam

To all of you who participated in the MVVM session today I hope you've enjoyed it and learned something new. It was a great pleasure to speak in front of you. As I promised, here are the presentation and demo code. Also here is the Agenda for the 4 days Advanced WPF course at Sela Group. CodeProject

Open Window, Dialog or Message Box from a ViewModel – part 2 by Tomer Shamam

In my previous post I have shown how to open a Window bound to a view-model triggered by the view, using a simple Action. In this post I'll show how to open a Window, triggered by the view-model.   Opening a window directly by the view where the view decides when a Window should be opened, is an incorrect approach since the view shouldn't make that decision. This decision belongs to the Application layer and not the Presentation layer. What if the view shouldn't be opened because...
תגים:, , , , ,

Open Window, Dialog or Message Box from a ViewModel – part 1 by Tomer Shamam

Saying that a view-model belongs to the Application layer, and the Application layer doesn't references upper layers, and must not create or use visual objects, how can I open a Window, Dialog or any kind of Message Box on-the-fly, based on some logic triggered by the view or view-model? Well, there are several options doing that, one is using kind of service which encapsulates that, providing an interface, so the view-model don't really work directly with the upper layer or WPF. This solution...
תגים:, , , , ,

My SDP Session About MVVM + MEF by Tomer Shamam

Thank you to all of you who participated in my SDP session " Architecting a Smart Client with MEF and MVVM " today at Crowne Plaza Hotel, Tel Aviv. I really hope that you enjoyed it and learned something new about MVVM and MEF. it was delightful. Feel free to download the Power Point presentation from here , and the source code from here . Also here is a small souvenir for remembering this session. Hope to see you soon in the near future, Tomer Shamam CodeProject

Animating ViewModel Properties instead of View Bound Properties by Tomer Shamam

Trying to animate a View property which is bound two-way to a View Model property, yields working animation but also unchanged View Model. It turns out that animating a two-way data-bound property breaks the data-binding! For example, having a line bounds to its view-model, X1, Y1, X2, Y2 properties, if you'll try to animate the Line, the line will be animated but at the same time its X1, Y1, X2, Y2 properties will left unbound. So how to fix that? Instead of animating the view, animate the view...

Blendability Part II – Design time support for Prism by Tomer Shamam

In my previous post I’ve presented the Blendability concept and explained how to leverage Blend’s sample-data generation in order to support view-model at design time. In this post I would like to continue with this concept and reveal a tiny research I’ve done related to design time support of Prism modules. If you’ve ever developed a WPF Composite Application using Prism you may be aware of a frustrating problem while trying to work with the Shell at design time. It always ends with something like...

Blendability Part I – Design time ViewModel by Tomer Shamam

In case that you haven't added the word ‘Blendability' to your XAML Jargon yet, I’m sure this post will inspire you doing so. The Blend-ability term describes how a piece of data model or view model is viewable or designable at design time, whether by Expression Blend or Visual Studio Designer. Building a Silverlight or WPF applications, everybody loves using the MVVM pattern. This pattern greatly decouples the view from its logic and domain model, hence enabling relatively easy unit testing...

Microsoft Open House Summary - WPF 4 and Blend 4 by Tomer Shamam

To all of you who participated in my WPF 4 and Blend 4 lecture at Microsoft Raanana today, it was my pleasure. I hope that you enjoyed and learned one or two things new about WPF.   You can download the presentation and demo code from here . Hope to see you soon.

Prism 4 Release by Tomer Shamam

Prism 4 November 2010 has been released yesterday by Karl Shifflett. This version of Prism 4 targets: .NET Framework 4.0 Guidance around the MVVM pattern Navigation Managed Extensibility Framework (MEF) You can read more about it here , and download it from here . Enjoy.
More Posts Next page »
Powered by Community Server (Commercial Edition), by Telligent Systems