Back to Devexpress

SmartPasteBehaviorProperties.ProcessClipboardImage Property

windowsforms-devexpress-dot-aiintegration-dot-winforms-dot-smartpastebehaviorproperties-28a39fea.md

latest2.8 KB
Original Source

SmartPasteBehaviorProperties.ProcessClipboardImage Property

Gets or sets whether to analyze images copied to the clipboard.

Namespace : DevExpress.AIIntegration.WinForms

Assembly : DevExpress.AIIntegration.WinForms.v25.2.dll

NuGet Package : DevExpress.AIIntegration.WinForms

Declaration

csharp
[DefaultValue(DefaultBoolean.Default)]
public DefaultBoolean ProcessClipboardImage { get; set; }
vb
<DefaultValue(DefaultBoolean.Default)>
Public Property ProcessClipboardImage As DefaultBoolean

Property Value

TypeDefaultDescription
DefaultBooleanDefault

True to analyze images copied to the clipboard; otherwise, False.

|

Available values:

NameDescriptionReturn Value
True

The value is true.

|

0

| | False |

The value is false.

|

1

| | Default |

The value is specified by a global option or a higher-level object.

|

2

|

Remarks

If the ProcessClipboardImage property is set to DefaultBoolean.True, SmartPaste checks whether the clipboard contains an image and attempts to extract structured data from it using AI.

csharp
using DevExpress.AIIntegration.WinForms;
using DevExpress.XtraBars.Ribbon;
using System.Collections.Generic;

namespace WinFormsSmartPasteImage {
    public partial class Form1 : RibbonForm {
        public Form1() {
            InitializeComponent();
            behaviorManager1.Attach<SmartPasteBehavior>(gridView, behavior => {
                behavior.Properties.ItemDescriptions.AddRange(new List<AIItemDescription>() {
                    new AIItemDescription(gridView.Columns["ProductName"], "Official name or product name."),
                    new AIItemDescription(gridView.Columns["Warranty"], "Information related to the product warranty (in years or months).")
                });
                behavior.Properties.ProcessClipboardImage = DevExpress.Utils.DefaultBoolean.True;
            });
        }
    }
}

See Also

SmartPasteBehaviorProperties Class

SmartPasteBehaviorProperties Members

DevExpress.AIIntegration.WinForms Namespace