Miguel A. Castro's Blog

# Friday, April 15, 2011

I’m headed to the Visual Studio Live conference in Las Vegas on Sunday. I'll be doing a full-day precon on WCF on Monday then two WPF talks on Tuesday.

If you’re going to be there, please stop by and say hi !

Friday, April 15, 2011 12:26:50 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [3] - - Follow me on Twitter
Speaking Events
# Friday, March 25, 2011

Update:

Nice blog post from an attendee: http://bejabbers2.blogspot.com/2011/03/inaugural-devready-event-on-mvvm.html

----------------------------------------------------

A big thank you to all who made it out to the DevReady MVVM events we put together on the 19th and the 21st in the Microsoft Philly and NYC offices!

The turnout was fantastic and the feedback I’ve seen so far has exceeded my expectations.

We had five sessions set up and they went as follows:

  1. XAML: Achieving your moment of clarity
  2. Programming with MVVM
  3. Programming with MVVM – Advanced Topics
  4. Platform Reusability with MVVM – also known as “How MVVM saved my butt and how laziness came back to bite me”
  5. Intro to Prism – previously “Leveraging Controls to Build XAML-based applications”

The first three sessions were done by me in what can be construed as a very painful delivery process, but not because of the sessions. A couple of days before, I woke up with an inflamed nerve in my left hip and I was in pretty intense pain for a while. I was walking with a cane and was popping Alleve like Dr. House pops Vitaken. By the time the first event (Philly) came around, I was better but nowhere near 100%. Luckily it was offset by a beautiful day on Thursday and I got to ride from Jersey down to Philly Intl. with the top down, seriously raising my mood.

What was I doing in Philly Intl you ask? That gets me to the most important point regarding these events. I was picking up a friend of mine who’s an evangelist for DevExpress. DevExpress graciously put up the sole sponsorship for both these events and provided everyone with both breakfast and lunch, along with several product licenses. On top of that, they flew Seth Juarez out to deliver one of the sessions, during which Seth also demonstrated the power and versatility of using DevExpress tools in WPF and Silverlight while also teaching attendees how to use the Prism framework.

Dani Diaz, the Microsoft Developer Evangelist for the Philly area delivered the fourth session at both events. Dani did a terrific job showing everyone how to take what I had just taught them and reuse it among a desktop and Phone 7 application.

Also, a great thank you to my own Developer Evangelist, Peter Laudati, for putting together all the tedious logistics at the NY offices. Anyone who has ever tried to throw an event in any Microsoft office knows that it is not a trivial process logistically and kudos goes out to both Peter and Dani for grabbing the bull by the horns on this one.

We’ve already received requests for repeating this event in other regions, possibly starting with the Capital Area, so DC here we come.

Once again, thank you to all involved in the events and thank you to the attendees for making it so much fun and putting up with my bizarre and sometimes unorthodox sense of humor; and most of all thank you to Developer Express, without whom these events could not have taken place.

Stay on top of the DevReady web site. There you can find out about more events and also about exactly what the DevReady concept is.

My session material for both these events can be found on the Downloads section of this site. The rest can be found on the DevReady web site.

 

Until next time…

Friday, March 25, 2011 11:34:28 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [2] - - Follow me on Twitter

# Wednesday, March 09, 2011

I’m running two events in the northeast called MVVM DevReady coming up this month.

The first one is in Philly (Malvern actually) and will run on Saturday the 19th of March.  The second is the following Monday, the 21st, in the NYC Microsoft office.

Both events are FREE of charge but registration is limited and is quickly filling up.  We just put up the registration site yesterday and are more than half full already.

I will be giving the first three sessions, with the local DE giving the fourth, and our sponsor providing the last session of the day. These events could not have been possible if not for our sponsor, Developer Express.  They are not only covering event expenses but are flying out one of their chief evangelists, Seth Juarez, to present the session personally.

The registration sites are:

3/19/2011 - Philly: http://devready-estw.eventbrite.com/

3/21/2011 - NYC: http://devreadynyc.eventbrite.com/


Get your development skills ready for MVVM (Model View View Model Design Pattern) and build some exciting applications for WPF, Silverlight or Windows Phone. In this all day event you will learn everything you need to know to get start with MVVM. We will start with the basics and end with some more advance topics.

Wednesday, March 09, 2011 3:17:43 PM (Eastern Standard Time, UTC-05:00)  #    Comments [9] - - Follow me on Twitter
Dev Stuff | Speaking Events
# Sunday, January 23, 2011

I’ve been beating my head against the wall with a small problem and after lots of trial and error, and some searching around, I found the answer – and it was NOT obvious !

The problem space was simple and common:

I have placed a lot of my styles, data templates, and converters into separate XAML files (ResourceDictionaries), with the idea of just declaring them in the App.Xaml since I’m pretty much using these all over the application.  I started out declaring things in my App.Xaml like this:

 

<Application.Resources>
    <controls:BooleanToVisibilityConverter x:Key="booleanToVisibilityConverter" />
    <refractionConverter:ReverseBooleanToVisibilityConverter x:Key="reverseBooleanToVisibilityConverter" />
    <refractionConverter:PercentageConverter x:Key="percentageConverter" />
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary>
            </ResourceDictionary>
            <ResourceDictionary Source="Resources/SharedResources.xaml" />
            <ResourceDictionary Source="Resources/MdiTemplates.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

 

Looks simple enough right?  Wrong.

The second I moved the converters from the individual User Controls to the App.Xaml, styles that are declared in the SharedResources.xaml file became unreachable.  In my debugging efforts, I tapped into the Application_Startup event to examine the resources that WPF was loading.  I noticed that the value of this.Resources.Count was 4, but the value of this.Resources.MergedDictionaries.Count was 0

So I continued digging and here’s what I found out:

Once you commit to using MergedDictionaries in your App.Xaml, you must use them for everything.  I moved the three converters inside the MergedDictionaries section and tested the debugging again.  This time, this.Resources.Count was set to 0, and this.Resources.MergedDictionaries.Count was set to 3.  This told me the resources I listed as MergedDictionaries were now loading.  The key indicator that things were better is that my styles now worked.

Here’s the code:

 

<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary>
                <controls:BooleanToVisibilityConverter x:Key="booleanToVisibilityConverter" />
                <refractionConverter:ReverseBooleanToVisibilityConverter x:Key="reverseBooleanToVisibilityConverter" />
                <refractionConverter:PercentageConverter x:Key="percentageConverter" />
            </ResourceDictionary>
            <ResourceDictionary Source="Resources/SharedResources.xaml" />
            <ResourceDictionary Source="Resources/MdiTemplates.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

 

I hope this helps since believe it or not, though there’s a lot of code samples out there, much of it is unclear and flat out wrong.

Until next time…

Sunday, January 23, 2011 3:24:02 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] - - Follow me on Twitter
Dev Stuff | WPF
# Wednesday, December 01, 2010

I’ll be doing a user group triple play this month starting on Tuesday, Dec. 14 at the Northern New Jersey .NET User Group.  On Wednesday, the 15th, I’ll be at the Philly .NET User Group, and on Thursday the 16th, I’ll be visiting the New York City .NET User Group.

The topic will be the same across all three groups, though the name seems to be different in each one.  I guess the common title would be, “Programming With MVVM”.  Here’s the session description:

WPF overwhelmed us with the most powerful data binding ever released in a development platform. It seemed there was so much to learn in order to use it, but it really isn't that complicated. However, to use it to its full potential, you really do need to introduce the Model-View-ViewModel pattern. The ideas and goal around this pattern seem to vary from person to person, but the one thing that they all share is that it provides a point of binding for XAML pages. In this session, I'll show you what MVVM is and how to use it and what to put in it, in order to get maximum potential out of XAML binding. I'll even show you how to get a small MVVM Framework going for sharing across all your applications.

Wednesday, December 01, 2010 12:18:23 PM (Eastern Standard Time, UTC-05:00)  #    Comments [4] - - Follow me on Twitter

Search
Me & My Flair

Read all about me here.
Download my Resume here.

Check out where I am here.
 
Click on logos above for profiles.
Archive
<October 2014>
SunMonTueWedThuFriSat
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678
Statistics
Total Posts: 40
This Year: 0
This Month: 0
This Week: 0
Comments: 93