Silverlight

Silverlight 3 RTW Writeable bitmap changes

Wednesday, July 15th, 2009

With the official release of Silverlight 3 RTW I received some feedback that my plasma sample wasn’t working anymore.
The problem occurs in some small changes in the Writeable bitmap api.
The official MS change document talks about the new constructor and the lock methods.

3.19 WriteableBitmap changes

The PixelFormat parameter for the WriteableBitmap constructor has been removed. WriteableBitmap(int pixelWidth, int pixelHeight, PixelFormat format) is now WriteableBitmap(int pixelWidth, int pixelHeight).

The only supported PixelFormat is now Pbgra32.

Similarly, the PixelFormat and PixelFormats type has been removed.Lock() and Unlock() have been removed.

But that’s not the only thing.
From now on you have to use the pixels property to write or read pixels.

I updated my previous sample and code.

Silverlight 3.0 Hands-on workshop

Friday, July 3rd, 2009

For those of you who aren’t member of the Belgian Silverlight User Group there’s a upcoming workshop on September 10th 2009.

In this workshop, we will build a small Silverlight 3.0 application showing some of the new concepts like out of browser, animation easing, deeplinking, pixel effects, importing Photoshop files and perspective 3D. Some experience with Silverlight 2.0 is required for this workshop.

The workshop is organized with the cooperation of Boulevart

Be quick because there only a few places left.
Register at http://www.besug.be.

Silverlight 3 Writeable Bitmap API - Plasma

Thursday, June 4th, 2009

plasma1

Updated on 15/07/2009 to Silverlight 3 RTW
(more…)

Jungle Fever

Tuesday, May 5th, 2009

screenshot-with-banner-449


It’s finally finished, my first Silverlight mini game.
In exception from the title image it’s 100% XAML.
All graphics done in MS Expression Design.

Had some small problems in blend, everything else was pretty straightforward.
If you have a background in .NET programming the transition will be smooth.

Enjoy !

Easing in C# Storyboards

Saturday, March 14th, 2009


Doing easing in and out in blend is pretty straightforward.
Creating that same storyboard in C# is just a mater of syntax.
(more…)

Drag and drop & scripted storyboard fun

Saturday, July 5th, 2008

This is a sample I created during a Silverlight course.
The goal was to create some custom buttons.
Since that’s no rocket science I added some scripted storyboards and drag and drop controls.

If someone is interested, here is the source

download

Silverlight usercontrol inheritance

Tuesday, July 1st, 2008

Demo and source code included below.
inheritance-monkies

At some point you think wouldn’t it be better to move all this functionality to  a super class ?
And right you are.
Since we all live in objectville it’s not so uncommon.

In my case I tried  to move some of the boring position functionality to a base control.
We all know that creating a basecontrol is peanuts.
But when we do this in a Silverlight control we run in some trouble.
Since our control lives in two files defined by two partial classes.
Partners in crime are the XAML file and the .cs (aka codebehind) file.

So when our .cs file inherits from basecontrol our XAML has to follow.
You probably think  so be it, no problem.
The problem occurs when you re-open that control in Expression Blend.
For no reason whatsoever Expression Blend kicks out the basecontrol.
If you don’t mind changing the XAML file every time you opened it in blend skip the rest of this post.
(more…)


lab101 is proudly powered by WordPress
Content and design by Kris Meeusen
Entries (RSS) and Comments (RSS).