In celebration of WinFX Beta2, I've attempted to recreate the Tablet PC SDK's beloved AutoClaims sample in WPF.
This sample demonstrates:
- collecting ink in multiple transparent layers, over an Image resource
- databinding for Strokes
- DefaultDrawingAttributes defined in static resources
- animated Opacity and ZIndex properties for smooth transitions among layers
- defines a pattern to coerce Tablet Input Panel handwriting recognition for the Year (YYYY) field
- Scrolling and resizing
- relative layout techniques
- ScrollViewer around the Image and InkCanvas elements
...all in 100% pure XAML!
Ok, admittedly it probably would've been easier to code some of those lengthy EventTriggers for managing the layers in C#. And I'm a little bummed to discover than I can't set Panel.ZIndex in partial trust (else you'd be running this app in your browser right now, not reading about it).
Still, it's a fun exercise in what can be done with InkCanvas and XAML, with so few lines of code compared to our WinForms platform. You really have to compile and run the mundane old WinForms version, and peruse the code, to appreciate this WPF rendition.