Wednesday, October 19, 2005

A ComboBox is nothing more than a fancy ToggleButton???

I'll cut to the rant, since I assume no one wants the long story. Basically, styles are powerful, people are doing insane things restyling Avalon controls. But one look at the style for ComboBox, and I'm puzzled. It's not that the style is nutty, I've deciphered enough XAML to be comfortable there, it's that it really really feels like styling was not meant to do this.

(Hat tip to KarstenJ for the serialization code, though Sparkle does it best (which I don't have at home...))

The problem is that random controls such as ToggleButton in the above sample are being repurposed solely to expand a popup menu by binding ToggleButton's IsChecked property with Popup's IsOpen. It works for this sample, but is not exactly what I'd call the best solution. Is this the best way to go from an event (mouse click) to setting a property? To use a two-way binding on a control that happens to handle the event you're interested in?

Monday, October 17, 2005

October Acrylic CTP released

What's in it for you, you ask? Less bugs, more speed. Always good. And it's solid. Rock solid.

If you haven't given taken Acrylic for a spin yet, try it out (and if you're a dev-type, don't overlook the integrated help, it's more than useful).

A personal goal for the week- use Acrylic in an Avalon project to make something that doesn't look like dog poo. I confess, I have no design skills. Avalon and easy access to rounded rects does little to help me out, it's about time for me to see what I can do instead of hacking stuff together with primitives.

Monday, October 10, 2005

Beziers, take 2.

What I actually started out to make when I made the last sample was a mouse cursor that used wavy lines instead of a cursor, but I got sidetracked somewhere into the wierd floating shape thing. Not like this is all that different.

Anyways, here's the same code, different use.


And as usual, the screenshots are boring. The running app has animations and interactivity!

Project Files
I have to admit, I have this thing about bezier curves. They're real cool, but a pain to work with.

I have all these fun ideas that use curvy flowing lines to give an organic feel to the otherwise rigid rectangular user interfaces. The first step was to create a 'string' class that could be treated like a line, but animated and manipulated like a loose string while keeping a flowing shape.

Yesterday I threw together an implementation of this, it's a bit of fun to watch. The code has quite a few uses, this first project is merely the first implementation. I'm hoping to get some curly line samples together soon too, but they should be simple.



What you see here are just 25 random points with a white fill. The fun part is that the entire thing is animated, using a new Jitter animation I implemented (derives from DoubleAnimationBase). The jitter animates between random values at a constant rate, a useful little tool. The screenshot above does no justice to the animated version.

If you run the app, the points on the shape are not moving- if you can find them and mouse over them (look for the hand cursor), they can be dragged around.

If Avalon had blend modes, this would be downright psychedelic.

Enjoy.

Source

Wednesday, October 05, 2005

I was very impressed by some of the small touches that were added to Microsoft Max, one of my favorites is the slick WrapPanel that glides all the pieces into place. I absolutely love smooth interfaces (as long as they stay out of the way- menu animations in windows? Off.)

So anyways, I just had to implement that slick panel. I hope the Max guys don't get mad.

Introducing SmoothMove (source & sample project)

What I came up with is a decorator object that is the root of the template for the items in the panel of choice. The decorator listens for LayoutUpdated events then changes the RenderTransform to undo the layout change. The RenderTransform is then animated to zero, thus moving the object to it's final location. The sample uses a WrapPanel to do the layout, but if you look at the code it's general for any layouts, though it only handles positioning and not rotations, scales, etc.

I wish I could figure out how to make animated gifs of the app, it really is quite fun to play with. Click on the rectangles to insert some more.

I'm also working on a MatrixAnimation class that can do matrix to matrix interpolation, it should be super useful, I have just a few kinks to work out on it. I snagged some code from Sparkle to do matrix decomposition then interpolate the respective parts and reconstruct the matrix. It's not the speediest thing around though. Hopefully I can get it going and get permission to share the code (I'm not sure about the matrix decomposition part).

Sunday, October 02, 2005

Assembly.org

My last post reminded me that I haven't checked out the assembly scene for a while, it's worth some time if you're into computer graphics.

You can browse the Assembly '05 winners here. And download the files here.

Some notables:
Che Guevara by Fairlight
Iconoclast by Andromeda Software
STS-04 Instant Zen by Synesthetics
Flight 666 by Loonies
I Fear Ajax.

Ajax, Asynchronous Javascript and XML. I have great admiration for what's been accomplished with it- Google Maps is slick and Outlook Web Access gets the job done. The problem is that my admiration is more for the obstacles that have been overcome than any interface innovations that have been introduced. It's the same thing as watching some assembly programs and what can be accomplished in a 64kb executable.

My fear of Ajax is that there is no better solution. Is this what UI design has come to? Is this the pinnacle of technology? Maybe I should just let go of the desire for 'the one' web interface technology. HTML, Flash, XUL, Ajax, Java, XAML- just figure out the need and decide on the technology. And hope your needs don't change.