Grant Hinkson Blog

Silverlight, WPF, Fireworks, Flash, XAML, .NET, User Experience, Graphic Design, Web Programming and more!

Archive for the ‘XAML’ Category

WPF Reflection Control

Jan 14,2007

WPF Control on Blend StageReflectionTarget DataBindingMore Controls Dialog

I was considering some of the common things that people want to do when they first start working with WPF. Creating reflections is one of those things, and while it’s not terribly difficult to do, it does become a monotonous task. And what do you do when you find yourself doing the exact same thing over and over? You create a custom control of course!

The Reflector control exists to perform one task: simulate a reflection of an object. You just bind the ReflectionTarget property (found in the Appearances category in Blend) to another control and it does all the work for you. If you want to tweak the reflection, you can always edit the ControlTemplate in Blend, but the default settings should cover most cases. I’m also looking at the height and width of the target control, so if you set the height and width of the Reflector control to Auto, it will size itself automatically (in most cases).

Lee Brimelow just posted a tutorial called Reflections in Visual Studio and Blend
at that shows how to manually create reflections. After watching that tutorial you’ll see what I’m taking care of automatically.

download WPF Reflection Control

(Note: Add a reference to this assembly in Blend by selecting the Project tab, right-clicking the References folder and selecting Add Reference. Browse to the assembly included in the zip file. Once you’ve added the reference, click the More Controls link on the tool menu (last item — double down arrows), and select the User Controls tab. You’ll see the Reflector control listed there.)

WPF/E and Flash Integration?

Dec 6,2006

Lee either gets no sleep, or has a lot more time for experimenting than I do. Check out this example where Flash and WPF/E live side by side and behave as one.

Dec 4,2006

Microsoft Expression BlendWow — lots of big updates available from Microsoft today. At the top of my list is Microsoft Expression Blend. This is the latest version of what was formerly known as Microsoft Expression Interactive Designer. Lots of “under the hood” changes have been made in this release, but the first thing that everyone will notice is the updated UI. Check out the Expression Blog for more details on the public beta. A new version of Expression Design is now also available for download. It has undergone the same UI treatment as Blend. It’s UI has actually been implemented using WPF, so you’ll see the same collapsible panels, styling and icons in both applications. I just fired up Design briefly, so I’ll post more thoughts once I’ve spent a little time using the tool.

In addition to the Expression releases, Microsoft has release the first CTP of “WPF/E”, which stands for Windows Presentation Foundation/Everywhere. Learn more via Mike Swanson’s post.

SWF to XAML Converter

Nov 21,2006

Mike Swanson just posted an early build of SWF2XAML, a tool that converts Adobe Flash SWFs to XAML artwork. Nice work Mike! Mike created the first Adobe Illustrator to XAML Converter used by practically everyone working in the WPF space and has compiled a WPF Tools and Controls page that is an excellent resource for WPFers.

Oct 3,2006

A minor update of the Fireworks to XAML Exporter has been posted on the Infragistics Visual Design Group site. This post addresses a gradient conversion issue that occurred under certain circumstances.

Fireworks gradient fills consist of a collection of color nodes and a collection of opacity nodes. Because an object can also have an opacity mask applied separately from the collection of opacity nodes, I am merging the opacity nodes with the color nodes into a single GradientStopCollection. Each gradient stop is of the format #AARRGGBB, which results in the same effect. This allows me to apply a separate opacity mask and maintain the Fireworks visual. This issue occurred during the node merge process.


Recent Comments