drafting behaviors

Posted by Karim on July 27, 2009

I finally had a chance to explore Expression Blend’s Interactivity SDK a bit and put together a simple HelloWorld app using it with Blend 3.

Screenshot

At the center is a rough custom Behavior that is able to share the visual state of controls that are bound to the same data object. Once the behavior was functional, I simply needed to add the behavior to two Buttons, bind the buttons to the same data, and wire an event to trigger the state change.

<Button MouseEnter="enterHandler" MouseLeave="leaveHandler">
  <i:Interaction.Behaviors>
    <local:SharedVisualStateBehavior Source="{Binding}" />
  </i:Interaction.Behaviors>
</Button>

private void enterHandler(object sender, MouseEventArgs e)
{
  SharedVisualStateBehavior.GoToSharedState(
    (Control)sender, "MouseOver");
}
private void leaveHandler(object sender, MouseEventArgs e)
{
  SharedVisualStateBehavior.GoToSharedState(
    (Control)sender, "Normal");
}

Because of the need to call a static method to actually make use of it, meaning it’s not selfcontained, it doesn’t really qualify as a Behavior.  The ideal SharedVSM would be able to take input in the form of VisualState parameters and possibly a trigger, in order to notify the shared controls of state changes.  It’s a work in progress.

Thanks to Kuler for the theme, Josh Smith for ObserveableObject from MVVM Foundation, and Pete Blois for BindingListener from Expression Samples.

silverlight released – bookmark roundup

Posted by Karim on July 26, 2009

Lots of releases this month; Silverlight 3, Blend 3 with Sketchflow, and an updated Deep Zoom composer all shipped. Windows 7 is around the corner and Wpf4 is in the pipe. It’s a great time to be working in UX.

Downloads
Silverlight 3 Dev Tools – Web Installer
Expression Blend 3
Deep Zoom Composer
Silverlight Toolkit
Expression Blend Samples

Noteworthy Sites
Birmingham Museums & Art Gallery
Thirteen23’s TED Player
IdentityMine
Microsoft
Silverlight.net

silverlight 3 beta available

Posted by Karim on March 18, 2009

As of this morning, downloads are published for the Silverlight 3 Runtime, SDK, Tools and Blend.

Blend
Silverlight 3 Runtime
Silverlight 3 Tools for Visual Studio 2008 SP1
SDK

Looking forward to exploring the new features and changes.

blendables has shipped!

Posted by Karim on September 18, 2008

After much sweat and toil, we’ve launched not one, but three products aimed at the discerning development shop that need to build non-trivial WPF applications quickly and reliably. Indeed many of the apps we’ve built ourselves, for our customers, leverage these controls, panels and tools. Check out the announcement for the details.

debugging design-time exceptions

Posted by Karim on July 13, 2008

I just found an excellent tip from Peter Blois on debugging exceptions in blend. Many, many people have experienced this with controls that work perfectly at runtime but throw in the designer, to the point where most designers/integrators will build out in a seperate, throw-away project and paste the result into the real thing.

Good post, Pete!