ClipboardAccessPolicy.AllowOperation(ClipboardOperation, String) Method
Enables the specified clipboard-related operation(s) for the specified data format.
Namespace: DevExpress.Data.Utils
Assembly: DevExpress.Data.Desktop.v24.1.dll
NuGet Packages: DevExpress.Data.Desktop, DevExpress.ExpressApp.Win.Design
Declaration
Parameters
Name | Type | Description |
---|---|---|
operation | DevExpress.Data.Internal.ClipboardOperation | The clipboard-related operation. |
dataFormat | String | The data format. |
Remarks
Use AllowOperation
and/or AllowDataFormats methods to enable specific operations for all or certain data formats when the ThrowAlways() restrictive policy is enabled.
using System;
using System.Windows.Forms;
using DevExpress.Data.Utils;
using DevExpress.Data.Internal;
namespace DXApplication {
internal static class Program {
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main() {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
ClipboardAccessPolicy.AllowOperation(ClipboardOperation.Copy, DataFormats.Text);
ClipboardAccessPolicy.ThrowAlways();
Application.Run(new Form1());
}
}
}
Read the following topic for additional information: Clipboard Access Policy.
See Also