Поделиться через


ContextNode.Location - свойство

Обновлен: Ноябрь 2007

Gets the position and size of the ContextNode object.

Пространство имен:  System.Windows.Ink
Сборка:  IAWinFX (в IAWinFX.dll)

Синтаксис

'Декларация
Public ReadOnly Property Location As AnalysisRegion
'Применение
Dim instance As ContextNode
Dim value As AnalysisRegion

value = instance.Location
public AnalysisRegion Location { get; }
public:
property AnalysisRegion^ Location {
    AnalysisRegion^ get ();
}
/** @property */
public AnalysisRegion get_Location()
public function get Location () : AnalysisRegion

Значение свойства

Тип: System.Windows.Ink.AnalysisRegion
The position and size of the ContextNode object.

Заметки

The location for a given ContextNode is based on the union of the locations 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, the location of the ContextNode is based on the location of all descendant leaf ContextNode objects.

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 named theInkCanvas.

Dim selectedNodeBounds As Rect = currentNode.Location.GetBounds()
Dim bounds As 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
Me.theInkCanvas.Children.Add(bounds)
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;
this.theInkCanvas.Children.Add(bounds);

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

ContextNode Класс

ContextNode - члены

System.Windows.Ink - пространство имен

System.Windows.Ink.AnalysisRegion