Tag | MVVM Posts

Paul Sheriff was a real character at the start of his MVVM in XAML session. There was a lot of sarcasm and self deprecation going on prior to the . That is never a bad way to get things rolling right after lunch. Then things got semi-serious. The presentation itself had a number of surprises, but not all of them had to do with XAML. When he flipped over his company’s code generation tool it took me off guard. I am used to generator that create code for a whole project, but his tools were able to ...

If you installed the latest MVVM Light version for Windows 8, you may encounter an issue where code snippets are not displayed correctly in the Intellisense popup. I am working on a fix, but for now here is how you can solve the issue manually.

Read the rest of this entry »

MVVM_Original_195x100

I just pushed the following to Codeplex:

Read the rest of this entry »

I wanted to spin an icon to show progress to my user while some content was downloading. I'm using MVVM (aren't you) and made a satisfactory Storyboard to spin the icon. However, it took longer than expected to trigger that animation from my ViewModel's property.I used a combination of the GoToState action and the DataTrigger from the Microsoft.Expression.Intera... dll as described here.Then I had problems getting it to start until I found this approach that saved the day. The DataTrigger didn't ...
With modern frameworks available that were built with loose coupling and separation of concerns in mind, working in WinForms may seem like a testability wasteland. But there are times when the options of WPF with MVVM or MVC on the web are not available, and you’re stuck with WinForms. But fear not, the Mode-View-Presenter pattern is here to save the day! If you are not familiar with the MVP pattern, the idea is that you have a presenter, which handles all the interactions between the user and the ...

Update: Posted the video of “MVVM Applied” below.

This week I was “on tour” in Belgium and Netherlands and presented 3 times:

Read the rest of this entry »

Today I gave a talk in TechDays in Belgium about MVVM in Silverlight 5, Windows Phone 7 and Windows 8. This was the first time I gave that particular talk, and in addition keep in mind this is a developer preview, meaning that it is not finished, and not always stable.

Read the rest of this entry »

If you're like me and are using MVVMLight to build Windows Phone apps, you probably want to unit test your ViewModels as well. One of the benefits of the MVVM pattern is the separation of concerns between the View (page holding the xaml layout and bindings) and the ViewModel which holds the data to be bound. This allows the ViewModel to be easily testable, or so they say. In the end, it is quite difficult to find some useable tutorial doing exactly that. To the point you might ask yourself : " do ...
In my previous post, Using LINQ to Twitter in Windows 8 Metro Apps, I cheated a little (some might say a lot) on my UI architecture by using code-behind. In this post, I’ll make it all better by showing you how to separate the model and interaction logic from the UI design – proper separation of concerns. I’ll accomplish this with a pattern, named Model-View-ViewModel (MVVM), which is widely used for WPF, Silverlight, and (soon) Windows 8 Metro Apps. I’ll start by discussing what MVVM is, move to ...

Ironically, my last release of MVVM Light V3 was about fixing bugs in templates and making them better. In the process however, seems that I introduced a regression bug in the WPF4 project templates. Yep shit happens.

Read the rest of this entry »

Four or five years ago I was “introduced” to ComponentOne’s Winform controls while working on a fairly large, data-intensive application. I remember being very surprised at how easy their controls were to use compared to others I had worked with. Based upon my earlier experience with their products, I had pretty high expectations when I started evaluating Studio for Entity Framework. I’m happy to say that the product easily met my expectations and in some areas, moved the bar a bit higher. Before ...
If you follow the MVP program a bit, you might have heard about Rob Eisenberg and his struggles with the MVP program. If you haven’t, well, just move along, there’s nothing interesting to read here. Still here? Good. For those of you who don’t know who Rob is: he is the creator of Caliburn and Caliburn Micro, a MVVM Framework I truly love, support and have written about here before. He is one of the bigger contributors to the Open Source community in the Microsoft technologies. If you work on anything ...
The current version of MVVM Light had a couple of issues in the project templates. The most annoying one was causing a problem when creating new projects: The GUIDs used to uniquely identify the project were in fact not re-generated properly every time, and we ended up with the same GUID in every new project. The symptoms are the following: If you side-load an MVVM Light application, and then side-load another one, you will see that the first one is overwritten. Note however that this is only an ...
Everyone has an opinion. When you embark upon your first real job as a programmer you will find this out very quickly. I have found that software developers can be some of the most opinionated and dogmatic people you will ever meet. This certainly is not a bad thing. However, young programmers will need to cultivate the ability to make their own minds up when it comes to how to write software. There are those who start out in a corporate environment where the styles and conventions used have already ...

I just pushed two big updates to MVVM Light setup components.

Read the rest of this entry »

We have just published SDNavigation a library that integrates the WP7 Navigation Framework into the MVVM pattern. It is based on Laurent Bugnion's INavigationService idea and combined with Rob GarFoot MVVM Navigation Framework approach to obtain the page context (via behavior). The current version contains a sample app to start using it, in the following days / weeks we expect to publish training material (posts, videos), stay tunned !! The team that have built this small (and hopefully useful ) ...

Here we go! After the Microsoft team released version 5 of Silverlight yesterday, MVVM Light is available for this version of the framework too. I did not create the installer yet (that will take a few more days), but you can download the source code and build it yourself easily.

Read the rest of this entry »

Microsoft just released the version 5 of Silverlight! It’s a great news and I really want to congratulate the whole team on this impressive collective effort. The official announcement is on the Silverlight team blog! Read the rest of this entry » ...

I was recently made aware of a couple of people having issues with WCF services (or ASP.NET applications) when using the MVVM Light project template for Silverlight. There is a blog post and a StackOverflow question, so what exactly is happening there?

Read the rest of this entry »

One of the main attraction points to this offering in my review is how does it fit into the work I do and solutions I recommend. Right off, the fact it has capabilities described as Silverlight focus/MVVM , makes it something that intrigued me. I tested the different capabilities it has from using it in WinForms and WPF as well, and Silverlight. One of the main points is the C1DataSource, it shows a level of simplicity through the property dialogs that allows you to move right along with, for example, ...
My newest course was published yesterday on Pluralsight on KnockoutJS. The course can be viewed here. It is divided up into 4 modules. The first module gives an introduction to Knockout and shows a “Beyond Hello World” demo. The second module discusses the different types of observables you have in Knockout and demos of each. The third module focus on bindings including templating and custom bindings. The fourth module brings everything together with data features while shows a few more advanced ...
While working on a WPF application, I had a need to show the wait cursor while performing a long running operation. You would expect the code to look as follows: System.Windows.Input.Cursor previousCursor = someWindow.Cursor; someWindow.Cursor = System.Windows.Input.Cursor... try { LongRunningOperation(); } finally { someWindow.Cursor = previousCursor; } However, I didn't want the long running process tying up the UI thread. I needed to run the long running operation on its own thread. I decided ...
In this Thanksgiving Day Issue: Andrea Boschin, Samidip Basu, Ollie Riches, WindowsPhoneGeek, Sumit Dutta, Dhananjay Kumar, Daniel Egan, Doug Mair, Chris Woodruff, and Debal Saha.Happy Thanksgiving Everybody! Above the Fold: Silverlight: "Silverlight CommandBinding with Simple MVVM Toolkit" Debal Saha WP7: "How many pins can Bing Maps handle in a WP7 app - part 3" Ollie Riches Shoutouts: Michael Palermo's latest Desert Mountain Developers is up Michael Washington's latest Visual Studio #LightSwitch ...
While I have always been a fan of libraries that improve coding efficiency and reduce code redundancy I have mostly been using ones that were in the public domain. As part of the Geeks With Blogs Influencers program a got my hands on ComponentOne’s Studio for Entity Framework. Below are my thought after working with the product for several weeks. My coding preference has always been maintainable code that is reusable across an enterprises protfolio. Because of this my focus in reviewing this product ...
In this Issue: XAMLGeek, WindowsPhoneGeek, Nigel Sampson, Jesse Liberty, Sumit Dutta(-2-), Dave Bost, Jared Bienz, Joost van Schaik, and Michael Crump. Above the Fold: Silverlight: "10 Laps around Silverlight 5 (Part 7 of 10)" Michael Crump WP7: "Using MVVMLight, ItemsControl, Blend and behaviors to make a ‘heads up compass’" Joost van Schaik Metro/WinRT/W8: "“Badevand” for Windows 8" XAMLGeek Shoutouts: Michael Palermo's latest Desert Mountain Developers is up Michael Washington's latest Visual ...
In this Issue: Colin Eberhardt, Sumit Dutta, Morten Nielsen, Jesse Liberty, Jeff Blankenburg(-2-), Brian Noyes, and Tony Champion. Above the Fold: Silverlight: "PV Basics : Client-side Collections" Tony Champion WP7: "Pushpin Clustering with the Windows Phone 7 Bing Map control" Colin Eberhardt Shoutouts: Michael Palermo's latest Desert Mountain Developers is up Michael Washington's latest Visual Studio #LightSwitch Daily is up From SilverlightCream.com:Pushpin Clustering with the Windows Phone 7 ...
In this Issue: Michael Washington, Oliver Fuh, Jeremy Likness, Derik Whittaker, Jesse Liberty, Jeff Blankenburg(-2-), and Michael Crump. Above the Fold: Silverlight: "Handling Extremely Large Data Sets in Silverlight" Jeremy Likness WP7: "31 Days of Mango | Day #8: Contacts API" Jeff Blankenburg LightSwitch: "LightSwitch Chat Application Using A Data Source Extension" Michael Washington Shoutouts: Michael Palermo's latest Desert Mountain Developers is up Michael Washington's latest Visual Studio ...
Check out the Top Five most popular news at SilverlightShow for SilverlightShow Top 5 News for November 07 - 13, 2011. Here are the top 5 news on SilverlightShow for last week: Will there be a Silverlight 6 (and does it matter)? Silverlight 5 - the end of the line Microsoft confirms move to align Windows & Windows Phone JavaScript, MVVM and Silverlight - Papa's Perspective How TO: Virtualizing WrapPanel .NET Visit and bookmark SilverlightShow. Stay in the 'Light  ...
In this Issue: Brian Noyes, Michael Crump, WindowsPhoneGeek, Erno de Weerd, Jesse Liberty, Derik Whittaker, Sumit Dutta, Asim Sajjad, Dhananjay Kumar, Kunal Chowdhury, and Beth Massi. Above the Fold: Silverlight: "Working with Prism 4 Part 1: Getting Started" Brian Noyes WP7: "Getting Started with the Coding4Fun toolkit Tile Control" WindowsPhoneGeek LightSwitch: "How to Connect to and Diagram your SQL Express Database in Visual Studio LightSwitch" Beth Massi Shoutouts: Michael Palermo's latest Desert ...
In this Issue: Colin Eberhardt, WindowsPhoneGeek, John Papa, Jesse Liberty, Derik Whittaker, Sumit Dutta, Asim Sajjad, Dhananjay Kumar, Charles Petzold, Peter Kuhn, and Ollie Riches. Above the Fold: Silverlight: "Display Total Records After Applying PagedCollectionView Filter" Asim Sajjad WP7: "Announcing: Phone as a Remote Control" Peter Kuhn Metro/WinRT: "Asynchronous Processing in Windows 8" Charles Petzold Shoutouts: Michael Palermo's latest Desert Mountain Developers is up Michael Washington's ...
In this Issue: Michael Washington, WindowsPhoneGeek, Jeremy Likness, Mike Taulty, Erno de Weerd, Jesse Liberty, Derik Whittaker, Sumit Dutta, Asim Sajjad, Dhananjay Kumar, and Avi Pilosof. Above the Fold: Silverlight: "Using Jounce Navigation to Create OOB Child Windows in Silverlight 5" Jeremy Likness WP7: "Video on How to work with WCF Services in Windows Phone 7" Dhananjay Kumar Metro/WinRT/WIndows 8: "Development Tip – Tab Control" Avi Pilosof LightSwitch: "Connecting To A .CSV or Excel File ...

 

Here are the slides and code samples for MVVM Programming Introduction given at TechEd Africa 2011

Today TechEd Africa 2011 ended. It was a great conference and the first time I have ever had the opportunity to present an hour long topic – I had the joy of presenting two sessions at this conference, one session based on a topic which I should have been able to cover easily and one with a topic that I battled with and felt totally out of my depth. In retrospect, there are a few bits of advice that I would like to give other people that are thinking of presenting at a conference like this for the ...
In this Issue: Michael Washington, Ollie Riches, Jesse Liberty, Peter Torr, Jeremy Likness, Derik Whittaker, WindowsPhoneGeek, Morten Nielsen, Michael Crump, Asim Sajjad, Andrej Tozon, Dhananjay Kumar, Laurent Bugnion, and Avi Pilosof. Above the Fold: Silverlight: "Using Visual States to Set Focus on a Control" Jeremy Likness WP7: "Background Agents" Jesse Liberty Metro/WinRT/Windows8: "Adding an Application Bar to your XAML Metro Applications." Michael Crump Metro/WinRT/Windows8: "Using The Silverlight ...
Sorry for the tardiness of this post, but I was out of state on family business. If you are looking for Silverlight Developers, I am in contact with developers looking for work, so I can make the introductions for you. In this All-Submittal Issue: Oscar Agreda, Michael Washington(-2-), Gill Cleeren(-2-), goldytech, Michael Crump, Ollie Riches, Colin Eberhardt, and David Catuhe. Above the Fold: Silverlight: "Silverlight Toolkit (September 2011) for Silverlight 5–What’s new?" David Catuhe WP7: "How ...
So, my excursion in the web world continues… One of the issues I have coming from silverlight / wpf is that I’m very used to the XAML, MVVM approach to developing, I can knock up a passable interface in XAML in very little time (note, I didn’t say a good interface), but I really don’t know how to do this in CSS.. OK, not totally true, I have a rough guess, I have played with things like Firebug, and modified existing css in the past, but the problem with that, is that I’m just tinkering. With this ...
A little snippet that might help anyone using the MVVM pattern. If we want to marshal something through to the Dispatcher Thread from a view model we can do the following within the ViewModel class… private void SendingToTheDispatcherThread() { Dispatcher dispatcher = Application.Current.Dispatc... if (!dispatcher.CheckAccess()) { dispatcher.BeginInvoke((Act... => { // put code for the dispatched here })); } else { // put code for the dispatched here } } ...
KnockoutJS is an awesome MVVM JavaScript data binding framework for building rich user experiences. As sites get more interactive and more presentation logic gets pushed to the client-side, it’s important to have rich frameworks which enable these scenarios. The next version of MVC is going to include the Knockout NuGet package in the box. Now is a perfect time to start learning Knockout. As I’ve been learning Knockout, I’ve been pleased to discover that, although it comes with a rich set of features ...
In this Issue: Damian Schenkelman, Dave Campbell, Laurent Bugnion, Pete Brown, Asim Sajjad, Daniel Egan, Kunal Chowdhury, Joost van Shaik, Jeff Wilcox, Cristian Merighi, and Avi Pilosof. Above the Fold: Silverlight: "Silverlight 5 in Action Book Excerpt: Using the Accelerometer from Silverlight 5 via Native Extensions" Pete Brown WP7: "A note about remote URIs in Windows Phone secondary tiles" Jeff Wilcox Metro/WinRT/Windows 8: "Quick tip: Select the correct INotifyPropertyChanged in Windows 8 / ...
I was very optimistic when I first saw Metro style apps coded in C# on Windows 8, because for the most part they are not much different than the well known XAML/C# pair on Silverlight or WPF. This led me to brag a bit about probably having a port of MVVM Light ready “in a few days”. Of course I didn’t take in account that I would have a great time the week after //build in Seattle, with fantastic weather and tons of friends to have dinner and conversations with. Needless to say, the few days turned ...
In this Issue: AfricanGeek, Andrea Boschin, Colin Eberhardt, Anoop Madhusudanan, Lee, Laurent Bugnion, Rudi Grobler, Xianzhong Zhu, Jesse Liberty, Asim Sajjad, Dhananjay Kumar, XAMLNinja, and Kunal Chowdhury. Above the Fold: Silverlight: "Develop a Flexible 2.5D Scene Editor Targeting Silverlight RPG Games - Part 2" Xianzhong Zhu WP7: "A Windows Phone 7.1 (Mango) MVVM Tombstoning Example" Colin Eberhardt Metro/WinRT/Windows 8: "Consuming WCF Service in Windows 8 XAML/C# metro application" AfricanGeek ...
Check out the Top Five most popular news at SilverlightShow for SilverlightShow Top 5 News for September 19 - 25, 2011. Here are the top 5 news on SilverlightShow for last week: Why John Papa is leaving Microsoft? The future of Silverlight The MVVM Dashboard Good News about Silverlight and WPF for a Change Win8, Metro Apps and Silverlight Visit and bookmark SilverlightShow. Stay in the 'Light ...

In the developer preview of Windows 8, I just noticed a breaking change in the way that data bindings react to the PropertyChanged event.

Read the rest of this entry »

Microsoft loves MVVM and INotifyPropertyChanged so much that they included this very useful interface twice in the new WinRT framework. Unfortunately, only one of these is working correctly (and the other one is likely a bug, remnant from the past ) Read the rest of this entry » ...
One of the very useful features of the MVVM Light toolkit is to help with the creation of design time data, in order to give something to see on the design surface (Expression Blend, Visual Studio designer). This is especially useful when designing list controls such as ListBox, ComboBox, etc. Without design time data, these controls will remain empty, and the designer will not see what he is working on. This can cost a lot of time and cause frustration. Read the rest of this entry » ...
In this Issue: Michael Washington, Kunal Chowdhury, WindowsPhoneGeek, Xianzhong Zhu, Jeremy Likness, Pete Brown, Jesse Liberty, Derik Whittaker, Morten Nielsen(-2-), Sumit Dutta, Asim Sajjad, and Dhananjay Kumar. Above the Fold: Silverlight: "Enumerating MIDI Interfaces using Silverlight 5 PInvoke" Pete Brown WP7: "Migrating PushBox Game from Android to Windows Phone 7 - Part 5" Xianzhong Zhu Windows8: "Windows 8: What you Need to Know" Jeremy Likness LightSwitch: "How To Create a LightSwitch Command ...
In this Issue: Shawn Wildermuth, Ollie Riches, Oscar Agreda, Samidip Basu, Dan Wahlin, Walt Ritscher, Laurent Bugnion(-2-), Andrej Tozon, András Velvárt, Vikram Pendse, Michael Crump, Andy Beaulieu(-2-), Michael Sync(-2-), Above the Fold: Silverlight: "The MVVM Dashboard" Oscar Agreda WP7: "SurfCube on Mango Part 4 – fighting with the ListPicker control" András Velvárt Windows 8: "Why I’m Excited About Windows 8" Dan Wahlin LightSwitch: "Creating LightSwitch Custom Controls" Michael Washington Shoutouts: ...

If you are using MVVM-Light style ViewModel creation (often referred to as “view-first”), you might have noticed that you cannot build if you have an object in the view’s resources. It means that the code below does not compile.

Read the rest of this entry »

Last week, Microsoft held their long awaited Build Windows (or simply "Build") conference in Anaheim CA. About 5000 people packed the convention center to discover the latest version of the Windows operation system: Windows 8.

Read the rest of this entry »

This morning, I published MVVM Light V4 beta1 in the form of an MSI. The installation instructions are detailed on the MVVM Light installation page. Please make sure to uninstall previous versions before you install V4 beta1. There are quite a few changes in this version, and I plan to blog about various features in the coming days. As usual, stay tuned! Read the rest of this entry » ...