Ink.CanPaste - метод
Обновлен: Ноябрь 2007
Returns a value that indicates whether the data on the Clipboard can be converted to an Ink object.
Пространство имен: Microsoft.Ink
Сборка: Microsoft.Ink (в Microsoft.Ink.dll)
Синтаксис
'Декларация
<UIPermissionAttribute(SecurityAction.Demand, Clipboard := UIPermissionClipboard.AllClipboard)> _
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name := "FullTrust")> _
Public Function CanPaste As Boolean
'Применение
Dim instance As Ink
Dim returnValue As Boolean
returnValue = instance.CanPaste()
[UIPermissionAttribute(SecurityAction.Demand, Clipboard = UIPermissionClipboard.AllClipboard)]
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public bool CanPaste()
[UIPermissionAttribute(SecurityAction::Demand, Clipboard = UIPermissionClipboard::AllClipboard)]
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = L"FullTrust")]
public:
bool CanPaste()
/** @attribute UIPermissionAttribute(SecurityAction.Demand, Clipboard = UIPermissionClipboard.AllClipboard) */
/** @attribute PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust") */
public boolean CanPaste()
public function CanPaste() : boolean
Возвращаемое значение
Тип: System.Boolean
true if the data can be converted to an Ink object; otherwise, false.
Заметки
Примечание о безопасности. |
---|
If using under partial trust, this method requires AllClipboard permission. See Security And Trust for more information. |
Примеры
In this example, the Opening event of a ContextMenuStrip is used to enable or disable the Paste command on the menu. If the Clipboard contains data that can be pasted into the ink in the InkOverlay object, the Paste command on the menu is enabled.
Private Sub menuStrip_Opening(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles menuStrip.Opening
Me.miPaste.Enabled = mInkOverlay.Ink.CanPaste()
End Sub
private void menuStrip_Opening(object sender, CancelEventArgs e)
{
this.miPaste.Enabled = mInkOverlay.Ink.CanPaste();
}
Платформы
Windows Vista
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0