InkDrawingNode.SetShapeName - метод
Обновлен: Ноябрь 2007
Adds a new user-defined shape name for the InkDrawingNode.
Пространство имен: Microsoft.Ink
Сборка: Microsoft.Ink.Analysis (в Microsoft.Ink.Analysis.dll)
Синтаксис
'Декларация
Public Sub SetShapeName ( _
newShapeName As String _
)
'Применение
Dim instance As InkDrawingNode
Dim newShapeName As String
instance.SetShapeName(newShapeName)
public void SetShapeName(
string newShapeName
)
public:
void SetShapeName(
String^ newShapeName
)
public void SetShapeName(
String newShapeName
)
public function SetShapeName(
newShapeName : String
)
Параметры
- newShapeName
Тип: System.String
The name of the shape.
Заметки
After a new shape name is set, that string appears as an AnalysisAlternate for the InkDrawingNode. Setting multiple strings creates multiple alternates.
Примеры
The following example looks for all the InkDrawingNode objects in an InkAnalyzer, theInkAnalyzer and sets a shape name of "Dot" to those whose Strokes have bounds that are smaller than 200 ink units.
' Look for all InkDrawing nodes that are very small
Dim inkDrawingNodes As ContextNodeCollection = _
theInkAnalyzer.FindNodesOfType(Microsoft.Ink.ContextNodeType.InkDrawing)
Dim inkDrawing As InkDrawingNode
For Each inkDrawing In inkDrawingNodes
' Check bounding box for size
Dim bounds As Rectangle = inkDrawing.Strokes.GetBoundingBox()
If bounds.Width < 200 And bounds.Height < 200 Then
' Set shape name
inkDrawing.SetShapeName("Dot")
End If
Next inkDrawing
// Look for all InkDrawing nodes that are very small
ContextNodeCollection inkDrawingNodes =
theInkAnalyzer.FindNodesOfType(Microsoft.Ink.ContextNodeType.InkDrawing);
foreach (InkDrawingNode inkDrawing in inkDrawingNodes)
{
// Check bounding box for size
Rectangle bounds = inkDrawing.Strokes.GetBoundingBox();
if (bounds.Width < 200 && bounds.Height < 200)
{
// Set shape name
inkDrawing.SetShapeName("Dot");
}
}
Платформы
Windows Vista
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0