ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Framework.Contracts Namespace / Module Class / CanPasteSpecialAsync Method

In This Topic
    CanPasteSpecialAsync Method (Module)
    In This Topic
    Modules are constantly polled giving them the opportunity to enable the application's PasteSpecial button.
    Syntax
    protected internal virtual Task<bool> CanPasteSpecialAsync()
    Protected Friend Overridable Function CanPasteSpecialAsync() As Task(Of Boolean)

    Return Value

    A Task so the main user interface thread is not blocked while processing this request.
    Remarks
    To facilitate clipboard operations, the framework has created four commands (Copy, Paste, PasteSpecial, and Cut) that are registered to appear in the Clipboard group in several ribbon tabs. These commands, like most, are polled constantly for their enabled state. The unique feature about these commands is that they defer their logic to active window (Pane or DockPane) first and if this object returns false, they then consult each currently loaded module (until one returns true). For example, when a feature is selected in a map, the map pane may return false for CanCopyAsync but the Editing module, which has no pane of its own, may return true. The object that returns true for any of the ‘Can’ functions is the object that is called if the user clicks on the command.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also