10 Minute Tutorial - Silverlight: Mouse button and scroll wheel event handling using managed code (C#)

Originally, I wanted this post to stand as the definitive tutorial on mouse handling in Silverlight. However, after researching all the different methods people use to handle the right mouse button and scroll wheel in Silverlight, I quickly gave up that pipe dream. Instead, this tutorial serves as merely a starting point for handling mouse events in Silverlight. If you can’t find what you need here, chances are, someone else has hacked together the solution you nedd. I provide links to a few of these solutions on my Silverlight Portal page.

So, for this tutorial, we will create a rectangle that you can drag using the left mouse button, resize using the scroll wheel and change its color using the right mouse button. Hopefully, this examle will give you a basic overview on how to handle mouse events in Silverlight.

With all that said, let’s get started. Read more

Silverlight 2 Released!

After months of waiting, wishing and hoping, Microsoft FINALLY released Silverlight 2.0 today. Given both the Betas and the RC releases, we all pretty much know what the official release contains, so I won’t go over it here. I will however give you some links to read more:

Mike Snow announces the release
Jessie Liberty has an excellent release guide
Scott Guthrie gives an overview off the Silverlight 2 goodness

One other thing: It looks like Microsoftl also supports developing Silverlight applications using Eclipse! Although the tutorials I write on this site will never require you to have an IDE, I am very excited by this news. Here’s a few more links on Silverlight with Eclipse to whet your appetite:

eclipse4sl Home Page
Silverlight development with Eclipse tutorial

More Silverlight tutorials on the way!

Silverlight 2 RC0 Released; Silverlight Portal is up

Two pieces of news today. First, if you’ve lived under a rock for the past week, Microsoft dropped the bits for the first Silverlight 2 release candidate. This is a DEVELOPER RELEASE only. That means, Microsoft will have NO official consumer Silverlight 2 RC0 runtime, so you should not actually expose RC0 applications to the rest of the world. Mircosoft only did this release to make sure developers could get their applications converted over in anticipation of an official release (which means Microsoft may do an official release soon). You can find more information, including breaking changes, at the links below:

Method of Failed - Silverlight 2 RC0 Released for Developers
ScottGu’s Blog - Silverlight 2 Release Candidate Now Available
Silverlight Version 2 RC0 Released!! (details all breaking changes in the post)

Being a only a developer release, I wiil not update any of my Silverlight 2 Beta 2 tutorials. Once Microsoft offically releases Silverlight 2, then I will make sure all my tutorials work. However, after looking over the breaking changes, I believe all my samples should continue to work fine.

Secondly, I finally launched the first version of Die, Ajax!’s Silverlight Portal. Long-term, I want the Silverlight Portal to aggregate the best of all the Silverlight tutorials on the web in one place. Things may look kind of sparse now, but I will add plenty more tutorials over the following weeks. So, go ahead, knock yourself out.

And, he’s back!

Kick the tires and light the fires, baby!

Unknownst to my readers (and to me too, honestly), I decided to take a year hiatus from this site. I can’t come up with a decent excuse for not posting, so I won’t even try. Just know that I’m back in action now and don’t plan on leaving ever again. Read more

10 Minute Tutorial - JavaFX: Basic 2D Graphics and Animation

Update:

This tutorial will NOT work on the recently released JavaFX Preview SDK. In the move from JavaFX Script to compiled JavaFX code, much of the language and libraries have changed. Since the language and APIs continue to change at a rapid rate, I will not update this tutorial until they have stabled a bit more. If you want to see some JavaFX code that works under the JavaFX Preview SDK, you can read my JavaFX Hello World tutorial, and also look at these sites:

Feel free to read on….

My last JavaFX tutorial beared one part fruit and one part pain. Clearly, more bugs need squishing and more language features need exercising before JavaFX can even hope to call itself “beta” quality. But, each code drop does get better and better, and even now, I can tell that the end product will turn out nice. So…

…we will press on.(not the greatest movie, but that scene gets me everytime!)

JavaFX, due to its declarative syntax, promises to empower developers with the ability to quickly build engaging user-interfaces by leverage eye-popping effects and animations to deliver a deeper, more visceral experience. But, you’ve got to walk before you run so this tutorial will explore JavaFX’s basic animation concepts by creating a simple slideshow containing various shapes. For added fun, each slide will have the ability to rotate. While eye-popping it is not, I think this tutorial will give you a good starting point to begin working on more complex animations. Read more

← Previous PageNext Page →