corelibraries-devexpress-dot-data-dot-utils-dot-clipboardaccesspolicy-5d4aca3d.md
Applies a policy to suppress clipboard-access operations performed by DevExpress WinForms and WPF controls.
Namespace : DevExpress.Data.Utils
Assembly : DevExpress.Data.Desktop.v25.2.dll
NuGet Packages : DevExpress.Data.Desktop, DevExpress.ExpressApp.Win.Design
public static void SuppressContainsOperations()
Public Shared Sub SuppressContainsOperations
DevExpress controls access the clipboard on demand (for example, the Rich Text Editor can check if the clipboard contains RTF or XML data). Call the SuppressContainsOperations on application startup to disable such operations within all DevExpress controls in the application.
using System;
using System.Windows.Forms;
using DevExpress.Data.Utils;
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.SuppressContainsOperations();
Application.Run(new Form1());
}
}
}
Imports System
Imports System.Windows.Forms
Imports DevExpress.Data.Utils
Namespace DXApplication
Friend Module Program
''' <summary>
''' The main entry point for the application.
''' </summary>
<STAThread>
Sub Main()
Application.EnableVisualStyles()
Application.SetCompatibleTextRenderingDefault(False)
ClipboardAccessPolicy.SuppressContainsOperations()
Application.Run(New Form1())
End Sub
End Module
End Namespace
Read the following topic for additional information: Clipboard Access Policy.
See Also