Creating a simple WPF application using Prism: Part 3


In Part 2, we discussed on how to go about creating Modules in Prism, so how do we go about getting one module to talk to another? For this portion, I’m going to explain how to get the Search Module to talk to the Navigation Module. (btw, the source code for this app can be downloaded at the end of this post)

EventAggregator

Read the rest of this entry »

Advertisements
Posted in WPF. Tags: . 1 Comment »

Creating a simple WPF application using Prism: Part 2


Here’s a link to Part 1 of this walkthrough.

Continuing where I left off, let’s look at creating the Search Module, that is going to be plugged into the “Search Region” of our shell. The UI is basically a search bar where the user can enter a membership number to search for. Begin by creating a new WPF User Control Library into your solution.

Search_Module

Read the rest of this entry »

Posted in WPF. Tags: . 1 Comment »

Creating a simple WPF application using Prism: Part 1


How to build a simple WPF application with Prism….this post is going to be just that. If you are unclear about the architecture of Prism, do have a quick look at it on my previous post.

Wpf_Prism_app

Read the rest of this entry »

Posted in WPF. Tags: . 1 Comment »

Prism: Adding more colors to WPF and Silverlight


Light_dispersion_conceptual_wavesMicrosoft has recently released an updated version of Prism for WPF/Silverlight (Prism v2), as part of their Patterns and Practices Composite Application Guide.

This library or framework provides guidance for developing Enterprise Level applications for WPF and Silverlight, which encourages a loosely coupled, easily testable, modular structured approach with a few good use of design patterns.

Read the rest of this entry »

Posted in Silverlight, WPF. Tags: . 2 Comments »

Tip: Use specific port number when hosting WCF service in Cassini Web Server


When you are hosting a WCF service in Visual Studio, a Cassini Web Server will spin up and assign a random port number, e.g. http://localhost:61447/MyService. If you add a Service Reference, it will use that port number currently assigned by Cassini. This is all good until you stop the Cassini Web Server, or restart VS IDE. Where did my old port number go???

Read the rest of this entry »

Handling Cross-Threading in ObservableCollection


One of the best things I reckon in WPF is the introduction of ObservableCollection<T>. With this class, databinding becomes a breeze and developers no longer need to write custom code to get the same effect with INotifyPropertyChanged.

I was playing with some multi-threading code today to update my ObservableCollection and ran into an Exception with this message “This type of CollectionView does not support changes to its SourceCollection from a thread different from the Dispatcher thread.” Woah, what have I done? 🙂

Read the rest of this entry »

Posted in WPF. Tags: . 3 Comments »

Free ASP.NET MVC eBook Tutorial


You can find a link to download a free ASP.NET MVC eBook Tutorial in Scott Gu’s Blog, which is a 185 pages end-to-end tutorial on how to build an application with ASP.NET MVC. I’ve been reading it and I must say it’s very detailed and well illustrated, a must read!!!