Back to Devexpress

ClipboardAccessPolicy.SuppressAllOperations() Method

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

latest3.0 KB
Original Source

ClipboardAccessPolicy.SuppressAllOperations() Method

Applies a policy to suppress all clipboard-related operations within DevExpress WinForms and WPF controls (including 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 SuppressAllOperations()
vb
Public Shared Sub SuppressAllOperations

Remarks

Call the SuppressAllOperations on application startup to suppress all clipboard-related operations within DevExpress WinForms and WPF controls:

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.SuppressAllOperations();
            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.SuppressAllOperations()
            Application.Run(New Form1())
        End Sub
    End Module
End Namespace

Read the following topic for additional information: Clipboard Access Policy.

See Also

SuppressCopyOperations()

SuppressPasteOperations()

SuppressClearOperations()

SuppressContainsOperations()

ClipboardAccessPolicy Class

ClipboardAccessPolicy Members

DevExpress.Data.Utils Namespace