Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SmartPasteBehaviorProperties Class

Contains SmartPasteBehavior settings.

Namespace: DevExpress.AIIntegration.WinForms

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

NuGet Package: DevExpress.AIIntegration.WinForms

#Declaration

public class SmartPasteBehaviorProperties :
    BehaviorProperties

The following members return SmartPasteBehaviorProperties objects:

#Remarks

Once you attached the SmartPasteBehavior to a control, you should describe items so that SmartPaste can assign right values to appropriate items. In the context of SmartPaste, an item refers to a LayoutControlItem when working with a LayoutControl, or a GridColumn when working with a GridControl.

Settings include:

  • ItemDescriptions – Gets a collection of item descriptions (AIItemDescription).
  • ExcludedItems – Gets a collection of items excluded from SmartPaste.
public Form1() {
    InitializeComponent();
    behaviorManager1.Attach<SmartPasteBehavior>(gridView1, behavior => {
        behavior.Properties.ItemDescriptions.AddRange(new List<AIItemDescription>() {
                new AIItemDescription(gridView1.Columns["Price"], "The cost of the product, including any applicable taxes."),
                new AIItemDescription(gridView1.Columns["ShippingWeight"], "The weight of the product when packaged for shipping (in lbs or kg)."),
                new AIItemDescription(gridView1.Columns["Dimensions"], "The physical size of the product, typically in length, width, and height."),
            }
        );
        behavior.Properties.ExcludedItems.Add(gridView1.Columns["Rating"]);
    });
}

Tip

Read the following help topic for additional information: Smart Paste AI-powered Extension.

#Inheritance

Object
DevExpress.Utils.Base.BaseObject
DevExpress.Utils.Base.BaseProperties
DevExpress.Utils.Behaviors.BehaviorProperties
SmartPasteBehaviorProperties
See Also