Ink in 3-D with Windows Presentation Foundation (December CTP)
In December 2005, Microsoft released a Community Technology Preview of Windows Presentation Foundation (formerly code-named “Avalon”), the new presentation subsystem for Windows that unifies development of documents, graphics, and applications into a common platform. The InkCanvas element in this new platform is your “one-stop shopping” solution for collecting and rendering ink inside of applications designed for Windows Presentation Foundation.
To show some of the powerful features of Windows Presentation Foundation, I have put together a sample that demonstrates the InkCanvas element in combination with other exciting features such as 3-D graphics, animations and VisualBrushes. A VisualBrush is a very versatile and powerful brush that paints an area with a Visual. A Visual is a low-level graphical object that serves as the foundation of many useful graphical components. For example, the Window, FrameworkElement, Control classes are all types of visuals. In the sample application, the front and the back side of a rectangular 3-D geometry are painted using VisualBrushes that are associated with two InkCanvas controls. This simulates a piece of paper in 3-D space that allows the user to handwrite and edit (select, erase) the ink on either side of the paper. Each interaction with the 2-D InkCanvas controls is reflected immediately in the 3-D object.
Sample Download: http://download.microsoft.com/download/8/c/9/8c979422-c52d-416c-9496-e7980c7295c8/Paper3DSample.EXE
To compile and run the sample application you will need the following:
- Windows XP (with SP2), Windows Server 2003 or Windows Vista (December CTP)
- Visual Studio 2005: http://msdn.microsoft.com/vstudio/
- WinFx December CTP: http://msdn.microsoft.com/windowsvista/getthebeta/default.aspx
Stefan Wick - Tablet PC Team