| Since the initial announcement of the Silverlight Control Builder Contest, we've received a lot of attention and support from various vendors! I am happy to announce that we have added prizes from vendors like Telerik, Xceed, and the SilverlightShow to the contest prize purse. If you look on the prizes page, you can see that we are really giving away a lot of stuff! A special Thanks goes out to all the vendors for helping to make the contest even more exciting! We have plans to add even more prizes in the coming days, so stay tuned for an announcement on that as well! Only 35 days remain until the ending of the contest so good luck! | |
I will be speaking about building Templatable Silverlight Controls at the
Columbia Developers Enterprise Guild on Wednesday, July 9th, 2008.
Presentation Details
Creating reusable controls is an important aspect of productive software development. When you can supplement this reusability with customizability, you have the power to rapidly deliver seamless and compelling user experiences in your products. Silverlight offers both of these through the use of custom templatable controls. In this presentation, we will take a short journey through the process of building a custom control using Silverlight.
See you there!
Tuesday, July 8th, 2008, is the next meeting of the Pee Dee Area .NET User Group.
Lou Vega will give us a brief intro to Windows Mobile development using SMS and some common mobile developer tools. Then we'll take a closer look at using the State and Notifications Broker and provide a real-world working example of using SNB to develop a call blocking program for your Windows Mobile phone.
Focus will be Windows Mobile 6.x and using Visual Studio 2008 to developer mobile applications.
Speaker Bio
Lou Vega
CSSI, Inc.
Charleston, SC
Lou Vega is a founding member and current president of the Greater Charleston .NET User group. He works as a software engineer for CSSI, Inc. He’s an MCAD and MCSD for .NET and has been developing in .NET since 2002 with experience writing Active Directory management applications for large scale deployments. In late 2004 he began development of a Pocket PC Aviation Weather program for the U.S. Navy and has been hooked on Windows Mobile development ever since!
Web: http://ilovevb.net/Web/blogs/vbmobile/default.aspx
Blog: http://geekswithblogs.net/lvega
The Problem
While migrating a Silverlight 2 Beta 1 control to Beta 2, I encountered some odd behavior with the VisualStateManager and I thought I would document my experience in the event that you might run into the same issue. From what I can tell, this only occurs when you have multiple instances of a control that change state by animating color properties (ColorAnimation). There may be other ways to induce this behavior, but the following is the only way I have encountered personally. Simply put, calling VisualStateManager.GoToState to does not always go to the correct state in some cases, even though no exception is thrown and a true boolean value is returned.
After spending way too much time trying to find a bug in my code that didn't really exist, I submitted a post to the Silverlight forums. The response I got back from Microsoft is that in Beta 2, there are issues with the VSM and sharing resources (like Brushes). The result is random glitches state transitions.
A Demonstration
To reproduce the issue, I built a small control that contains a series of spheres. These spheres are supposed to turn on in sequence. In other words, if you mouse-over the 3rd sphere, the 3rd sphere and each of the spheres prior to the 3rd sphere will light up. All spheres after the third sphere will remain off. Now, at first glance, moving your mouse around the control works as expected, but after moving your mouse around for a while, the spheres will begin to switch to the incorrect states. See the screenshots below:
Live Demo
Source Code
The Workaround
So, the workaround for now is to avoid animating the colors as I have in the control above. One solution is to build your XAML in such a way that you have an ON Object and an OFF Object. Then on the mouse enter and mouse leave event, toggle the the opacity for the objects accordingly. The major downside to this is that you have to maintain two identical objects in your XAML which can be a maintenance nightmare if you are animating Path objects.
The Fix
According to Microsoft, this is a known issue and I am certain it will be fixed in the next drop. Until then, happy coding!
|
It's been a little quiet here on my blog for the past few weeks, but tonight you will know why! I am excited to announce the Silverlight Control Builder Contest! Ripping the content straight off the front page (I can do that, I wrote it!):
"Welcome to the Silverlight Control Builder Contest! With this contest, we hope to incite the development of many open and free Silverlight Controls that all developers can use in their applications, and what better way to do this than through a friendly contest! This contest is your chance to demonstrate your control building skills to the Silverlight community and win some pretty cool prizes at the same time!"
So go for it! We have a lot of cool prizes to give away including a 1-year MSDN Premium Subscription (thanks to Dave Campbell!). Good luck!
Also, if you want to help promote the contest, head over to the Frequently Asked Questions page and download a badge for your site.
|
 |
With the achievement of many product milestones at Microsoft, you can generally expect a post from Scott Guthrie. These well-written posts usually contain valuable information about the future product direction so it's always a good idea to read these posts (along with the comments) if you want to pick up on these tidbits. Below, I have extrapolated a few interesting items about the future of Silverlight from the Silverlight 2 - Beta 2 Post:
- "We ultimately expect to ship over a 100 controls for Silverlight"
This is cool, because there are only about 30 controls now. From the comments, Scott says that the drop down list / combo box will appear in the final release of Silverlight 2. I suspect that I lot of these controls are already being developed, they are just waiting for the controls to reach a certain level of quality before releasing them into the wild.
- WPF Compatability
Work is being done to improve compatibility with WPF, we should expect to see more changes to improve compatibility between the two technologies in future releases.
- Animation
You can now create storyboards in code and apply them to elements without specifically adding them to the document tree. Scott also mentions that per-frame animation callbacks will be included in the final release of Silverlight 2 as well.
- Interactive XAML Designer for Visual Studio.
They are working on support for a full-fledged interactive designer for Visual Studio. Hopefully, this will reduce the need to drop into Blend to do simple tasks. I'm not sure what the time line is for this.
I have updated a few of my Silverlight demo applications to work with the Beta 2 release of Silverlight. The update was fairly painless, but then again, these are really simple applications :)
Color Picker Control (Source Code)
Simple Color Picker control built with Silverlight. Useful in applications that require advanced color selection options.
Silverlight Binary Clock (Source Code)
Just a simple Binary Clock with a live reflection. Since we don't have a visual brush in Silverlight, I had to instantiate 2 clocks and apply a gradient opacity mask to the bottom clock to simulate the reflection effect.
Disco Dance Floor (Source Code)
This application is pointless, but it does demonstrate smooth animation in Silverlight under stressful conditions.

As promised by BillG himself earlier this week, Silverlight 2 (Beta 2) has just been released. I've compiled a few resources to get you started. Enjoy!
Enjoy!
Over at the Silverlight SDK Blog, a new post containing the full list of changes has been made. Some of the things that I thought would certainly make this release (like a combo box) do not appear. Although, I did read somewhere that there would be approximately 3-dozen controls after this release, so maybe we will be surprised!
Check out the full list here
Today at Tech-Ed, Bill Gates announced Silverlight 2 - Beta 2. The new beta is slated for release sometime this week. Here are a few authoritative news items that I found relating to the new beta: