Back to Devexpress

ClipboardAccessPolicy.SuppressContainsOperations() Method

corelibraries-devexpress-dot-data-dot-utils-dot-clipboardaccesspolicy-5d4aca3d.md

latest3.1 KB
Original Source

ClipboardAccessPolicy.SuppressContainsOperations() Method

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

Declaration

csharp
public static void SuppressContainsOperations()
vb
Public Shared Sub SuppressContainsOperations

Remarks

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.

csharp
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());
        }
    }
}
vb
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

SuppressAllOperations()

SuppressCopyOperations()

SuppressPasteOperations()

SuppressClearOperations()

ClipboardAccessPolicy Class

ClipboardAccessPolicy Members

DevExpress.Data.Utils Namespace