Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Location Property

ContextNode.Location Property

Gets the position and size of the ContextNode object.

Namespace: System.Windows.Ink
Assembly: IAWinFX (in iawinfx.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public AnalysisRegion Location { get; }
/** @property */
public AnalysisRegion get_Location ()

public function get Location () : AnalysisRegion

Not applicable.

Property Value

The position and size of the ContextNode object.

The location for a given ContextNode is determined by the union of the location of all strokes. If the ContextNode is a leaf node, strokes associated with that node are used. If the ContextNode is not a leaf node, all descendant leaf ContextNode objects are used to determine the location of the ContextNode.

If the ContextNode is not an ink leaf node or does not have any descendant ink leaf nodes, the node is considered to be a non-ink node or an ancestor of one or more non-ink nodes. The location of this type of node is determined by the location value of the non-ink leaf nodes.

This example draws a blue box around a ContextNode, cNode, whose strokes have been drawn on an InkCanvas, theInkCanvas.

Rect selectedNodeBounds = currentNode.Location.GetBounds();
Rectangle bounds = new Rectangle();

bounds.Width = selectedNodeBounds.Width;
bounds.Height = selectedNodeBounds.Height;

bounds.SetValue(InkCanvas.TopProperty, selectedNodeBounds.Top);
bounds.SetValue(InkCanvas.LeftProperty, selectedNodeBounds.Left);
bounds.Stroke = Brushes.Blue;

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

© 2015 Microsoft