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


InkOverlay.CollectingInk - свойство

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

Gets a value that specifies whether ink is currently being drawn on an InkOverlay object.

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

Синтаксис

'Декларация
<BrowsableAttribute(False)> _
Public ReadOnly Property CollectingInk As Boolean
'Применение
Dim instance As InkOverlay
Dim value As Boolean

value = instance.CollectingInk
[BrowsableAttribute(false)]
public bool CollectingInk { get; }
[BrowsableAttribute(false)]
public:
property bool CollectingInk {
    bool get ();
}
/** @property */
/** @attribute BrowsableAttribute(false) */
public boolean get_CollectingInk()
public function get CollectingInk () : boolean

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

Тип: System.Boolean
A value that specifies whether ink is currently being drawn on an InkOverlay object.
true if ink is being drawn on the InkOverlay object; otherwise, false.

Заметки

You can use the CollectingInk property to see if ink is being drawn on an InkOverlay object rather than monitoring the Stroke event.

ms582160.alert_note(ru-ru,VS.90).gifПримечание.

Because ink collection is handled on a separate thread from your application code, the CollectingInk property can change to true while your application code is operating under the assumption that it is still false. To handle this contingency, code that depends upon the value of the CollectingInk property should be contained within a try-catch block.

Примеры

In this example, all strokes of the InkOverlay object are selected by setting the Selection property to the same Strokes collection used by the associated Ink object.

After the selection is made, the EditingMode property is set to Select.

The EditingMode property cannot be changed while the object is collecting ink. Because ink collection is handled on a separate thread from your application code, the CollectingInk property can change to true while your application code is operating under the assumption that it is still false. To handle this contingency, access to the EditingMode property should be contained within a try-catch block.

' Select all strokes
' mInkObject can be InkOverlay or InkPicture
Try
    If Not mInkObject.CollectingInk Then
        mInkObject.Selection = mInkObject.Ink.Strokes
        mInkObject.EditingMode = InkOverlayEditingMode.Select
    End If

Catch
    ' handle or rethrow
End Try
// Select all strokes
// mInkObject can be InkOverlay or InkPicture
try
{
    if (!mInkObject.CollectingInk)
    {
        mInkObject.Selection = mInkObject.Ink.Strokes;
        mInkObject.EditingMode = InkOverlayEditingMode.Select;
    }
}
catch
{
    // handle or rethrow
}

Платформы

Windows Vista

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

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

.NET Framework

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

См. также

Ссылки

InkOverlay Класс

InkOverlay - члены

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

InkOverlay.Stroke