[MVVM + Mediator + ACB = cool WPF App] – Intro

Finally I managed to spare some time and build a WPF sample application to showcase the use of MVVM + Mediator and also how AttachedCommandBehaviours can be used to further reduce (or better eliminate) C# code in XAML code behind files. I am also using one of my favorite WPF libraries FluidKit. In the app I create my own 3D transition for the FluidKit TransitionPresenter (I will be posting a whole post on this).

I will be posting at least 4 posts

– MVVM

– MVVM and the Mediator pattern

– FluidKit CoverFlow and FluidKit TransitionPresenter

– Using AttachedCommandBehaviours

Here are some teaser screenshots of the application in action 🙂

Screen1 Screen2

Screen3 Screen4

 

Setup of application environment

This application uses a SQL Database so you will need an instance of SqlServer 2005 running (you can use SqlServer Express).

I packaged the database as a backup so all you need to do is restore the database from the SqlServer Management Studio Express (this is your easiest option). If you don’t have this I suggest you download it, it’s free.

To restore the database file (WPFDisciplesDB.bak) follow these steps

– First of all download the database file from here.

– Right click on the Databases folder in the SQL Server Management Studio Express and select Restore database

Step 1

This will open a dialog for you. In the Restore Database dialog enter a name for the database in the “To database” text field > Select “From device” radio button and browse for the WPFDisciples.bak that you downloaded. The file will appear in the list. Tick the checkbox (which is un checked by default) and press ok.

Step 2 

Now that we have our database set up all we need to do is specify in the app.config the connection string of the new database and we are done.

Stayed tuned because this should be real fun 🙂

aaaa I nearly forgot… The data in the database is not the full version… I will add more projects from the mighty WPF Disciples as time goes by…. Will continue updating the download link here (and put a comment or something to show you that I updated the db version)

Download Full Source Code from HERE

Just in case you missed it, here is a copy of the database

Meeting Sacha Barber, the one and only!!!

This week I was in London for a course on Silverlight by Ian Griffiths. I have to say, it was really brilliant, I loved it! Ian is simple brilliant, so if you are thinking about going to one of his courses, don’t think about it, JUST GO !!!!!!

Anyway back to my original posting… I was in London so I decided to go visit my friend Sacha Barber in Brighton. I guess I don’t need to introduce Sacha, after all if you do not know Sacha you cannot say you know WPF 🙂

So I took a train and I was in Brighton in no time. We went for a couple of beers in a bar, then went for a small walk and soon after we headed to eat some Spanish food….. Sarah, the wife to be of Sacha joined us as well for dinner. She is really nice, I think Sacha is really a lucky champ to have her. Well it works both ways (Mode=TwoWay) because she is lucky to have him 🙂

We really had loads of fun, Sacha is a great guy. I am really looking forward to meet up with him again….

Sadly, we took no photos together, I guess we were too busy thinking on Beers and Sangria … hihi…. yea, Sacha is the best!!

These are the only photos we took….

Yea my camera is not so good 😦