InkPicture.InkEnabled - свойство
Обновлен: Ноябрь 2007
Gets or sets a value that specifies whether the InkPicture control collects pen input.
Пространство имен: Microsoft.Ink
Сборка: Microsoft.Ink (в Microsoft.Ink.dll)
Синтаксис
'Декларация
<BrowsableAttribute(True)> _
Public Property InkEnabled As Boolean
'Применение
Dim instance As InkPicture
Dim value As Boolean
value = instance.InkEnabled
instance.InkEnabled = value
[BrowsableAttribute(true)]
public bool InkEnabled { get; set; }
[BrowsableAttribute(true)]
public:
property bool InkEnabled {
bool get ();
void set (bool value);
}
/** @property */
/** @attribute BrowsableAttribute(true) */
public boolean get_InkEnabled()
/** @property */
/** @attribute BrowsableAttribute(true) */
public void set_InkEnabled(boolean value)
public function get InkEnabled () : boolean
public function set InkEnabled (value : boolean)
Значение свойства
Тип: System.Boolean
true if the InkPicture control collects pen input. Default.
false if the InkPicture control does not report pen input. No pen-related events fire.
Заметки
In addition to ink, pen input may include in-air packets, cursor in range events, and so on.
The InkPicture control collects ink in Microsoft® Windows® XP Tablet PC Edition or any edition of Windows 2000, Windows Server 2003, or Windows XP on which the Windows XP Tablet PC Edition SDK is installed. However, handwriting recognition occurs only if you use Windows XP Tablet PC Edition. In any edition of Windows 2000, Windows Server 2003, or of Windows XP other than Windows XP Tablet PC Edition, the InkEnabled property is always false if the Windows XP Tablet PC Edition SDK is not installed.
If the window input rectangle of an enabled InkCollector or InkOverlay (set in the constructor or with the SetWindowInputRectangle method) overlaps the window input rectangle of an InkPicture, a COMException exception is thrown.
![]() |
---|
Overlap can occur without an error as long as only one of the input rectangles is enabled at anytime. |
While a control is not enabled, you receive no events.
When you set the Enabled property of a container control to false, all of its contained controls are disabled as well.
You cannot set the InkEnabled property to false while the control is collecting ink (CollectingInk property is true.).
The InkEnabled property must be set to false before setting or calling specific properties and methods of the control. If you try to change the specified properties or call the specified methods, an error occurs.
The following properties and methods cannot be set or called unless the InkEnabled property is first set to false:
Properties:
Methods:
You should set the InkEnabled property for an InkPicture control to false before you shut down an application.
Примеры
The following example defines an event handler for a ButtonClick event. When the event is fired, the handler toggles the value of the InkEnabled property, and updates the text of the Button to reflect what action the next click will perform.
' Event handler for the button's Click event.
Private Sub buttonToggle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buttonToggle.Click
' toggle the InkEnabled property and update button text
mInkPicture.InkEnabled = Not mInkPicture.InkEnabled
If mInkPicture.InkEnabled Then
DirectCast(sender, Button).Text = "Disable Ink"
Else
DirectCast(sender, Button).Text = "Enable Ink"
End If
End Sub
// Event handler for the button's Click event.
private void buttonToggle_Click(object sender, System.EventArgs e)
{
// toggle the InkEnabled property and update button text
mInkPicture.InkEnabled = !mInkPicture.InkEnabled;
((Button)sender).Text = (mInkPicture.InkEnabled) ? "Disable Ink" : "Enable Ink";
}
Платформы
Windows Vista
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0
См. также
Ссылки
Microsoft.Ink - пространство имен