windowsforms-devexpress-dot-aiintegration-dot-winforms-dot-smartsearchbehaviorproperties-c863ba2e.md
Allows you to subscribe to behavior events.
Namespace : DevExpress.AIIntegration.WinForms
Assembly : DevExpress.AIIntegration.WinForms.v25.2.dll
NuGet Package : DevExpress.AIIntegration.WinForms
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public AIEvents Events { get; set; }
<Browsable(False)>
<EditorBrowsable(EditorBrowsableState.Never)>
Public Property Events As AIEvents
| Type | Description |
|---|---|
| DevExpress.AIIntegration.WinForms.AIEvents |
AI-related events.
|
using DevExpress.AIIntegration.WinForms;
using DevExpress.XtraBars.Ribbon;
public Form1() {
InitializeComponent();
// Display a search box in the Ribbon control's caption
ribbon.OptionsSearchMenu.SearchItemPosition = SearchItemPosition.Caption;
behaviorManager1.Attach<SmartSearchBehavior>(ribbon, behavior => {
behavior.Properties.ItemDescriptions.AddRange(new AIItemDescription[]{
new AIItemDescription(itemEnableSystemProtection, "Activates software protection against unauthorized access."),
new AIItemDescription(itemLogin, "Displays a sign-in or login form."),
new AIItemDescription(itemSettings, "Displays settings and options related to security and protection."),
new AIItemDescription(itemRBAC, "Manages user access permissions and role-based access control (RBAC)."),
new AIItemDescription(itemBackup, "Backs up (creates a copy of) sensitive data (information)."),
new AIItemDescription(itemRestore, "Restores data from a backup database."),
});
behavior.Properties.Events.OperationFailed += Events_OperationFailed;
});
}
void Events_OperationFailed(object sender, AIOperationFailedEventArgs e) {
// Handle the operation failed event
}
Imports DevExpress.AIIntegration.WinForms
Imports DevExpress.XtraBars.Ribbon
Public Sub New()
InitializeComponent()
' Display a search box in the Ribbon control's caption
ribbon.OptionsSearchMenu.SearchItemPosition = SearchItemPosition.Caption
behaviorManager1.Attach(Of SmartSearchBehavior)(ribbon, Sub(behavior)
behavior.Properties.ItemDescriptions.AddRange(New AIItemDescription(){
New AIItemDescription(itemEnableSystemProtection, "Activates software protection against unauthorized access."),
New AIItemDescription(itemLogin, "Displays a sign-in or login form."),
New AIItemDescription(itemSettings, "Displays settings and options related to security and protection."),
New AIItemDescription(itemRBAC, "Manages user access permissions and role-based access control (RBAC)."),
New AIItemDescription(itemBackup, "Backs up (creates a copy of) sensitive data (information)."),
New AIItemDescription(itemRestore, "Restores data from a backup database.")
})
AddHandler behavior.Properties.Events.OperationFailed, AddressOf Events_OperationFailed
End Sub)
End Sub
Private Sub Events_OperationFailed(sender As Object, e As AIOperationFailedEventArgs)
' Handle the operation failed event
End Sub
See Also
SmartSearchBehaviorProperties Class