Class SfPromptLibrary
Represents a prompt library that displays and manages a collection of predefined prompts.
Implements
Inherited Members
Namespace: Syncfusion.Maui.AIAssistView
Assembly: Syncfusion.Maui.AIAssistView.dll
Syntax
public class SfPromptLibrary : SfView, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, IThemeElement
Remarks
Supply a flat sequence of PromptItem objects through ItemsSource. The control derives category and subtopic navigation directly from each item.
Constructors
SfPromptLibrary()
Initializes a new instance of the SfPromptLibrary class.
Declaration
public SfPromptLibrary()
Fields
ItemsSourceProperty
Identifies the ItemsSource bindable property.
Declaration
public static readonly BindableProperty ItemsSourceProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
PromptSelectedCommandProperty
Identifies the PromptSelectedCommand bindable property.
Declaration
public static readonly BindableProperty PromptSelectedCommandProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Properties
ItemsSource
Gets or sets the collection of prompts displayed in the prompt library.
Declaration
public IEnumerable ItemsSource { get; set; }
Property Value
| Type |
|---|
| System.Collections.IEnumerable |
PromptSelectedCommand
Gets or sets the command that is executed when a prompt is selected from the prompt library.
Declaration
public ICommand PromptSelectedCommand { get; set; }
Property Value
| Type |
|---|
| System.Windows.Input.ICommand |
Methods
ArrangeContent(Rect)
Arranges the internal Prompt Library view within the supplied bounds.
Declaration
protected override Size ArrangeContent(Rect bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.Maui.Graphics.Rect | bounds | The final layout bounds assigned to the control. |
Returns
| Type | Description |
|---|---|
| Microsoft.Maui.Graphics.Size | The arranged size. |
Overrides
MeasureContent(Double, Double)
Measures the internal Prompt Library view.
Declaration
protected override Size MeasureContent(double widthConstraint, double heightConstraint)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | widthConstraint | The maximum width available to the control. |
| System.Double | heightConstraint | The maximum height available to the control. |
Returns
| Type | Description |
|---|---|
| Microsoft.Maui.Graphics.Size | The desired size of the internal view. |
Overrides
OnCommonThemeChanged(String, String)
Responds when the application-wide common theme changes.
Declaration
public void OnCommonThemeChanged(string oldTheme, string newTheme)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | oldTheme | The previously applied common theme. |
| System.String | newTheme | The newly applied common theme. |
OnControlThemeChanged(String, String)
Responds when the control-specific theme changes.
Declaration
public void OnControlThemeChanged(string oldTheme, string newTheme)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | oldTheme | The previously applied control theme. |
| System.String | newTheme | The newly applied control theme. |
Events
PromptSelected
Occurs when a prompt is selected from the prompt library.
Declaration
public event EventHandler<PromptSelectedEventArgs> PromptSelected
Event Type
| Type |
|---|
| System.EventHandler<PromptSelectedEventArgs> |