<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">SamGeo's Tablet Avalon Blog</title><subtitle type="html">Details about Tablet's integration in the Avalon platform.</subtitle><id>http://blogs.technet.com/tavalon/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.technet.com/tavalon/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.technet.com/tavalon/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2005-07-15T13:58:00Z</updated><entry><title>Dude, where's my Ink object?</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/tavalon/archive/2005/11/15/414536.aspx" /><id>http://blogs.technet.com/tavalon/archive/2005/11/15/414536.aspx</id><published>2005-11-15T20:59:00Z</published><updated>2005-11-15T20:59:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;We’ve made some fairly large changes to the ink object model in Avalon.&amp;nbsp; It differs now from our COM / WinForms Ink object model in several key ways that I’d like to discuss.&amp;nbsp; In this post, I’ll talk about our decision to remove the Microsoft.Ink.Ink object.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;At a high level, there were two main reasons for the changes&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;1)&amp;nbsp; Feedback on our COM / WinForms OM&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;2) Our Avalon inking OM is pure managed code all the way down and it gave us the opportunity to make sure it fits well into the .NET platform&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;Our existing COM / WinForms platform is largely unmanaged COM code in InkObj.dll, with a thin managed wrapper in Microsoft.Ink.dll.&amp;nbsp; This strategy was a good one as it helped us make our OM available to a wide range of languages: VB6, C++/COM, C#, VB.NET, etc.&amp;nbsp; Avalon on the other hand is almost entirely managed code and is not available from VB6, C++ / COM.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;One of the major differences between the Avalon and COM / WinForms inking platform is that that COM / WinForms exposes an ‘Ink’ object that can be thought of as a DOM or database of Stroke data while there is no ‘Ink’ object in Avalon and Strokes own their own data.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;Let’s start by looking at the legacy inking ink platform.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;Each collection of Strokes can be thought of as a recordset of Stroke objects.&amp;nbsp; Thus, to delete a Stroke from the Ink object, you must call Ink.DeleteStroke(Stroke) instead of simply Ink.Strokes.Remove(Stroke).&amp;nbsp; If you delete the underlying Stroke data from the Ink object, there can still be outstanding Strokes ‘recordsets’ in memory with a reference to a Stroke object that represents the deleted Stroke data.&amp;nbsp; Microsoft.Ink.Stroke exposes a ‘Deleted’ property to indicate this situation exists.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;Each Stroke was identified by its ID property instead of object equality.&amp;nbsp; Why?&amp;nbsp; Because of the DOM / Recordset model.&amp;nbsp; There can be multiple Stroke objects that represent the same underlying data in the Ink object.&amp;nbsp; The Ink object assigned unique monotonically increasing integers to each Stroke data and it could ensure that there were no conflicts since it owned the data.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;The COM / WinForms inking platform was designed with Win32/COM memory management in mind, while the Avalon ink platform was designed for a purely managed environment.&amp;nbsp; Instead of an Ink object that is a DOM or database of Stroke data, each Stroke owns its own data and is garbage collected when no longer referenced.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;In Avalon, when a Stroke is no longer referenced by any StrokeCollections, it is simply GC’d.&amp;nbsp; Note that in this model, Stroke.ID and Stroke.Deleted are not needed (and not possible).&lt;/FONT&gt;&lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=414536" width="1" height="1"&gt;</content><author><name>SamGeo</name><uri>http://blogs.technet.com/members/SamGeo.aspx</uri></author></entry><entry><title>September CTP is now available for download</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/tavalon/archive/2005/09/15/410920.aspx" /><id>http://blogs.technet.com/tavalon/archive/2005/09/15/410920.aspx</id><published>2005-09-15T18:38:00Z</published><updated>2005-09-15T18:38:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;The latest Avalon bits are now available (September CTP).&amp;nbsp; Tablet Avalon integration is included in the Avalon assemblies for all platforms and largely represents the APIs we will ship with.&amp;nbsp; There are only a few very minor tweaks we are making right now that will be in the next CTP.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;To download, go to &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/windowsvista/getthebeta/default.aspx"&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;http://msdn.microsoft.com/windowsvista/getthebeta/default.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;&amp;nbsp;and click on the 'Download the WinFX Runtime Components – September CTP' link.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;Enjoy!&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=410920" width="1" height="1"&gt;</content><author><name>SamGeo</name><uri>http://blogs.technet.com/members/SamGeo.aspx</uri></author></entry><entry><title>Controlling the appearance of Strokes with DrawingAttributes</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/tavalon/archive/2005/08/04/408688.aspx" /><id>http://blogs.technet.com/tavalon/archive/2005/08/04/408688.aspx</id><published>2005-08-05T05:46:00Z</published><updated>2005-08-05T05:46:00Z</updated><content type="html">&lt;P class=MsoNormal&gt;&lt;SPAN class=GramE&gt;&lt;FONT color=#000080 size=2&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;To start off with…&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face="Times New Roman" color=#000000 size=3&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT color=#000080 size=2&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;When you collect Strokes in an InkCanvas, the appearance of each Stroke is controlled by two things:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;SPAN&gt;1)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;The sampling points of the Stroke (or spine)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;SPAN&gt;2)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;The DrawingAttributes of the Stroke&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT color=#000080 size=2&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;A good way to think of this is that at each sampling point, there is a shape around the point:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;IMG src="http://www.samandcortney.com/blog/samplingpoints1.jpg"&gt; &lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT color=#000080 size=2&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;Each shape is connected:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;IMG src="http://www.samandcortney.com/blog/samplingpoints2.jpg"&gt; &lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT color=#000080 size=2&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;If the ink is being collected with a Stylus, and there is pressure information present, we scale the shape at each sampling point based on the pressure:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;IMG src="http://www.samandcortney.com/blog/samplingpoints3.jpg"&gt; &lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT color=#000080 size=2&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;And then we fill the outer contour and render the stroke.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;IMG src="http://www.samandcortney.com/blog/samplingpoints4.jpg"&gt; &lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT color=#000080 size=2&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;To control the shape for each sampling point (and ultimately how the Stroke appears), we have a class named DrawingAttributes.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;You can find it as properties on two objects:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;SPAN&gt;1)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=SpellE&gt;&lt;B&gt;&lt;SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;Stroke.DrawingAttributes&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt; – Controls what each Stroke looks like&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;SPAN&gt;2)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;InkCanvas.DefaultDrawingAttributes&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt; – Controls the DrawingAttributes that each new Stroke collected by the InkCanvas will have.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Since DrawingAttributes is a reference type, we clone the InkCanvas.DefaultDrawingAttributes for each new Stroke.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;If we didn’t, all Strokes would change appearance when any &lt;SPAN class=SpellE&gt;Stroke.DrawingAttributes&lt;/SPAN&gt; instance was altered.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT color=#000080 size=2&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;Here are the properties that DrawingAttributes has, and what each controls:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;SPAN&gt;1)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;Color&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt; – The color of the Stroke.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;We use this to create a &lt;SPAN class=SpellE&gt;SolidColorBrush&lt;/SPAN&gt; to fill the Stroke with when we render it to the MIL (Avalon Media Integration Layer)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;SPAN&gt;2)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=SpellE&gt;&lt;B&gt;&lt;SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;IgnorePressure&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt; – A &lt;SPAN class=SpellE&gt;&lt;SPAN class=GramE&gt;boolean&lt;/SPAN&gt;&lt;/SPAN&gt; that instructs us to ignore pressure if present.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;If this is set to false, we will scale the shape around each sampling point based on the pressure collected at the sampling point.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;SPAN&gt;3)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;StylusTip&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt; – The shape of the sampling points.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;We support Rectangle and Ellipse.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;SPAN&gt;4)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;StylusTipTransform&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt; – A Matrix that allows you to rotate / shear / scale the shape of the sampling points.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;SPAN&gt;5)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;Height&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt; – The height of the shape around the sampling points.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;SPAN&gt;6)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;Width&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt; – The width of the shape around the sampling points.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;SPAN&gt;7)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;FitToCurve&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt; – Set this to true if you would like us to apply Bezier smoothing to the Stroke.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;SPAN&gt;8)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=SpellE&gt;&lt;B&gt;&lt;SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;IsHighlighter&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt; – A boolean that instructs us to treat this Stroke in a special way by applying a transparency that doesn’t blend with other &lt;SPAN class=SpellE&gt;IsHighlighter&lt;/SPAN&gt; Strokes of the same color.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;In our COM \ WinForms platform, which rendered via GDI&amp;nbsp;\&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&amp;nbsp;GDI+, this was controlled by the &lt;SPAN class=SpellE&gt;DrawingAttributes.RasterOperation&lt;/SPAN&gt; property, but the MIL does not support GDI raster ops.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT color=#000080 size=2&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;Understanding InkCanvas, &lt;SPAN class=SpellE&gt;EditingModes&lt;/SPAN&gt; and DrawingAttributes enables you to do a lot with our platform.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;In upcoming &lt;SPAN class=SpellE&gt;blogs&lt;/SPAN&gt;, I plan on talking about:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;SPAN&gt;1)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;The difference between our Avalon and COM \ WinForms object model’s and why we made changes&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;SPAN&gt;2)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;How to do recognition of your Avalon Strokes&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;SPAN&gt;3)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;How to do custom rendering of your Avalon Strokes&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT color=#000080&gt;&lt;SPAN class=GramE&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;And more.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: Verdana"&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Stay tuned…&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=408688" width="1" height="1"&gt;</content><author><name>SamGeo</name><uri>http://blogs.technet.com/members/SamGeo.aspx</uri></author></entry><entry><title>Editing with InkCanvas</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/tavalon/archive/2005/07/22/408117.aspx" /><id>http://blogs.technet.com/tavalon/archive/2005/07/22/408117.aspx</id><published>2005-07-22T22:16:00Z</published><updated>2005-07-22T22:16:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;Going a little deeper into &lt;a href="http://blogs.technet.com/tavalon/archive/2005/07/15/407768.aspx"&gt;InkCanvas&lt;/A&gt;…&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;InkCanvas not only collects and renders ink, but it also allows editing of that ink, as well as any elements hosted in the InkCanvas.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I wanted to talk about two very important properties on InkCanvas that control editing:&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;InkCanvas.EditingMode and InkCanvas.EditingModeInverted&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;Both properties are of type InkCanvasEditingMode:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;public enum InkCanvasEditingMode&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;None = 0,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Ink,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;GestureOnly,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;InkAndGesture,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Select,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;EraseByPoint,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;EraseByStroke,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;InkCanvas.EditingMode controls the editing mode that InkCanvas uses for the tip of the Stylus, InkCanvas.EditingModeInverted controls the editing mode for the back of the Stylus (the eraser).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;By default, EditingMode is set to Ink, and EditingModeInverted is set to EraseByStroke.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;While our COM \ WinForms InkOverlay and InkPicture had an EditingMode property, they did not have an EditingModeInverted property.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;A common question developers had was how to implement back of Stylus erase; we’ve added the EditingModeInverted property to InkCanvas to make this work out of the box.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;These properties are settable in XAML, so you can change the defaults as you like:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&amp;lt;Grid xmlns=http://schemas.microsoft.com/winfx/avalon/2005&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;lt;InkCanvas EditingMode=”InkAndGesture” EditingModeInverted=”EraseByStroke”/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&amp;lt;/Grid&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;This is what each InkCanvasEditingMode value does:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT color=#000080&gt;&lt;FONT face=Verdana&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=1&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;None:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt; Instructs the InkCanvas to not perform any editing operations.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The InkCanvas will simply behave like a normal element.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=#000080 size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT color=#000080&gt;&lt;FONT face=Verdana&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=1&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;Ink:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt; Ink is collected for the Stylus or Mouse.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Any time a Stroke is collected (a series of down, optional move and up of the Stylus or Mouse), the InkCanvas.StrokeCollected event will be raised and the Stroke will be added to the InkCanvas’s StrokeCollection (available from the InkCanvas.Strokes property)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=#000080 size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT color=#000080&gt;&lt;FONT face=Verdana&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=1&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;GestureOnly:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt; Ink is collected, but after each Stroke, it is passed to the gesture recognizer (mshwgst.dll) if present and the Gesture event is raised.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The event args for the Gesture event describe the gesture recognition results.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Once the event fires, the Stroke is removed from the InkCanvas.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;FONT color=#000080&gt;&lt;FONT face=Verdana&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT color=#000080&gt;&lt;FONT face=Verdana&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=1&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;InkAndGesture:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt; A combination of the above two modes.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The Stroke is first evaluated to see if it is a gesture.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If it is, it is removed from the InkCanvas.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If not, it is left on the InkCanvas.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=#000080 size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT color=#000080&gt;&lt;FONT face=Verdana&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=1&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;Select:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt; The InkCanvas will select Strokes and or child elements either by tapping on them, or by selecting them via lasso selection.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=#000080 size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT color=#000080&gt;&lt;FONT face=Verdana&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=1&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;EraseByPoint:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt; Point erase mode.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;You can control the size of the eraser via the EraserShape property.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=#000080 size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT color=#000080&gt;&lt;FONT face=Verdana&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=1&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;EraseByStroke:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt; Stroke erase mode.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;When the eraser comes in contact with a Stroke, it is removed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=#000080 size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B style="mso-ansi-font-weight: normal; mso-bidi-font-weight: normal"&gt;&lt;FONT face=Verdana color=navy size=1&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 9pt"&gt;That’s all for now.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Next time… using InkCanvas.DefaultDrawingAttributes to control how new Strokes look when added to the InkCanvas.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=408117" width="1" height="1"&gt;</content><author><name>SamGeo</name><uri>http://blogs.technet.com/members/SamGeo.aspx</uri></author></entry><entry><title>Introducing Tablet Avalon</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/tavalon/archive/2005/07/15/407768.aspx" /><id>http://blogs.technet.com/tavalon/archive/2005/07/15/407768.aspx</id><published>2005-07-15T23:58:00Z</published><updated>2005-07-15T23:58:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;Tablet PC has had platform technologies for COM \ WinForms developers dating back to our first release in 2001.&amp;nbsp; Over the last few years,&amp;nbsp;the Tablet&amp;nbsp;team has been busy developing a new Tablet client platform for Avalon.&amp;nbsp; We’ve integrated our code directly into the Avalon assemblies, which makes inking available anywhere Avalon is.&amp;nbsp; I’m the development lead for the team and I started this blog to talk about what we’ve done in the Tablet Avalon platform, and why.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;To start off, if you haven’t already, install the May CTP of Avalon / CLR:&lt;BR&gt;CLR:&lt;BR&gt;&lt;/FONT&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=7ABD8C8F-287E-4C7E-9A4A-A4ECFF40FC8E&amp;amp;displaylang=en"&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;http://www.microsoft.com/downloads/details.aspx?familyid=7ABD8C8F-287E-4C7E-9A4A-A4ECFF40FC8E&amp;amp;displaylang=en&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;Avalon / Indigo&lt;BR&gt;&lt;/FONT&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=b789bc8d-4f25-4823-b6aa-c5edf432d0c1&amp;amp;displaylang=en"&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;http://www.microsoft.com/downloads/details.aspx?familyid=b789bc8d-4f25-4823-b6aa-c5edf432d0c1&amp;amp;displaylang=en&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;You can also install the Tablet PC SDK to get support for a stylus on an integrated or external digitizer.&amp;nbsp; If you don’t install this, you can still ink with your mouse&lt;BR&gt;Tablet PC SDK 1.7&lt;BR&gt;&lt;/FONT&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=B46D4B83-A821-40BC-AA85-C9EE3D6E9699&amp;amp;displaylang=en"&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=B46D4B83-A821-40BC-AA85-C9EE3D6E9699&amp;amp;displaylang=en&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;The Avalon / Indigo link also has links to Visual Studio and the WinFX SDK.&amp;nbsp; Once you have installed those, adding ink to your application is as simple as this:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;&amp;lt;Grid xmlns=http://schemas.microsoft.com/winfx/avalon/2005&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;InkCanvas/&amp;gt;&lt;BR&gt;&amp;lt;/Grid&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;You can type that directly into the XAMLPAD tool that is included with the WinFX SDK, drag your mouse (or stylus) across the InkCanvas to get ink!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;FONT color=#000080&gt;InkCanvas is similar to the &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tpcsdk10/lonestar/unmanaged_ref/inkpicture_ref/tbobjinkpicture.asp"&gt;&lt;FONT color=#000080&gt;InkPicture&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#000080&gt; control that is part of the Tablet COM \ WinForms platform. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;The difference is that InkCanvas can host more than an image; in fact, it can host anything an Avalon Canvas can.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=407768" width="1" height="1"&gt;</content><author><name>SamGeo</name><uri>http://blogs.technet.com/members/SamGeo.aspx</uri></author></entry></feed>