Contents tagged with Silverlight

  • Sydney Architecture User Group – Next Meeting: Why Windows Azure is not just Generic Brand Web Hosting

    The Sydney Architecture User Group is having its second meeting this month on Thursday, 26th November. Full details can be found on our new (but very simple) website located here ( ). You can subscribe to the monthly email and also indicate your intention to come by selecting the RSVP option (which would be really nice if you did :-) )


  • Silverlight 3 and WCF Faults

    On  a previous project that utilised WCF and Silverlight 2, I began implementing an error handling strategy that was going to rely on certain FaultExceptions being propagated to the Silverlight client. Well it turned out that Silverlight 2 does not support FaultExceptions so that was not going to fly and a custom solution was built.


  • Debugging Silverlight apps using WinDbg

    While working on a silverlight application for my current engagement, we were seeing some weird memory issues and application crashes. I won't bore you with the initial investigation of the issue, but it turns out we need to delve deep into what was going on behind the scenes. A fellow colleague and friend, Miguel Madero, was also encountering similar issues. He also did some work in debugging the issues he was seeing,  and because they were similar to mine, I had a little headstart in where to look. Note: I know that Miguel will also be publishing some debugging tips around Silverlight and he is a Silverlight gun so keep an eye on his blog for more details.


  • Silverlight and unsupported features

    Like a lot of people lately, I have been playing with Silverlight (Alpha 1.1 version), trying to understand the nuts and bolts of it, and when that fails, just diving in and seeing how I go. I can’t say I am much of a WPF/XAML guru so things have been slow.

    What is hard is just diving in and trying to implement stuff, then realising that I am trying to use an supported feature. A few examples:

    I wanted to add some MouseOver effects to particular Canvas (while lamenting the absence of any grid controls in Silverlight), and eventually realised that the “MouseEnter” routed event is not supported as an event trigger, only the “Loaded” event is. Kinda weird I thought, a little painful but not too bad. It means you need to resort to code, and in my case, I wanted to do some scale animations, so needed to put those ScaleAnimations in the Resouce section of my canvas (that exists within my Page1.xaml file) like this:


      <Storyboard x:Name="fullScreenIconEnlargeTimeline">

        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="txtFullScreenIcon" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">

          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="2.646"/>


        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="txtFullScreenIcon" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">

          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="3.75"/>


        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="txtFullScreenIcon" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">

          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="-65"/>


        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="txtFullScreenIcon" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">

          <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="27.5"/>




    My Canvas object definition looked something like:

    <Canvas x:Name="fullScreenCanvas" Width="157" Height="72" Canvas.Left="515"

                        MouseLeftButtonUp="FullScreenClick" RenderTransformOrigin="0.5,0.5" Canvas.Top="-7"

              MouseEnter="FullScreenMouseEnter" MouseLeave="FullScreenMouseLeave">

    // ... rest of definition continues.....

    You’ll notice the MouseEnter="FullScreenMouseEnter" event definition. Now in my code behind (Page1.xaml.cs) I have this:

    public void FullScreenMouseEnter(object sender, EventArgs e)




    Obviously it would be nicer to hook all this up in XAML (wel at least thats how I would like to do it) but that requires support for RoutedEvents other than Loaded as I mentioned earlier.

    I should also note that I am using a combination of Blend and Visual Studio (Orcas) to get the XAML how I want it. Timelines are easier within Blend (IMHO) but in a lot of other cases I feel more confortable going into the XAML itself to edit. If I had XAML intellisense in Blend, I’d be much happier.