• Hosting Silverlight outside the browser (sourcecode)

    Over half a year ago I blogged about a solution for hosting a Silverlight plugin outside the browser. This is not about the SL3 out-of-browser feature. This is a solution where the Silverlight plugin is hosted directly in your WinForm application without the need for a browser control. The demonstrated prototype included an implementation for Silverlight COM interfaces entirely written in C#. The prototype worked nicely and then nothing happened. Fast forward 7 months; after reading Scott Hanselman's post on '32 Ways to Keep Your Blog from Sucking' I have decided to obey Hanselman's law #16: 'Have a Code Garage Sale'. It basically states that if you have code lying around and nothing happens with it, publish it. So there you have it; the source code of a prototype Silverlight host that does not require a browser. The host is capable of displaying both single XAML pages and entire XAP packages, the included TestApp demonstrates both. Please be aware that this is just a prototype; certain things just don't work. For example; you won't be able to type any text in a textbox in the XAML page example. There's probably a lot more to fix, but the ...

    Full story

    Comments (0)

  • Animated page navigation in SL3

    Silverlight 3 includes a navigation framework that allows for partitioning your application into separate pages and provides easy page navigation with integrated browser's back/forward button support. If you have the Silverlight 3 Tools for Visual Studio installed, the Silverlight Navigation Application template provides a great start for building applications using the navigation framework. While working recently on a navigation application, there was this requirement for animated page transitions. Moving from one page to another must look pretty and if possible should include advanced animations with pages flying in, fading out, etc. So I started investigating if and how this was possible with the navigation framework. And the answer is that it is very, very easy and it does not require a single line of code. While devising a solution for animating transitions I immediately had this new TransitioningContentControl class (available in the SL3 Toolkit) in mind. The TransitioningContentControl is a ContentControl that provides transition animation when the Content property of the control is changed. Sounds like a perfect candidate for my animation page navigation solution, but how to incorporate the TransitioningContentControl in the navigation framework? The answer is: using custom control templates. Pages are hosted in a Frame control ...

    Full story

    Comments (0)