ClipboardAccessPolicy.AllowOperation(ClipboardOperation) Method
Enables the specified clipboard-related operation.
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. |
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