Skip to content

MAUI - Added API reference link for new features in SfAIAssistView #3178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions MAUI/AIAssistView/data-binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ To add an [AssistItem](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAss
3. After setting the properties, add the `AssistItem` instance to the `ViewModel.AssistItems` collection, which binds to the `SfAIAssistView.AssistItems` property.

N> The [IsRequested](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.AssistItem.html#Syncfusion_Maui_AIAssistView_AssistItem_IsRequested) property is automatically set to `True`, indicating it is a request from the user. If you want to manually add a request item through code, ensure you explicitly set the `IsRequested` property to `True`.
Additionally, use the [CurrentUser](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.SfAIAssistView.html#Syncfusion_Maui_AIAssistView_SfAIAssistView_CurrentUser) property to specify the requester in the `SfAIAssistView`.

{% tabs %}
{% highlight c# tabtitle="ViewModel.cs" %}
Expand Down
22 changes: 11 additions & 11 deletions MAUI/AIAssistView/styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -1162,17 +1162,17 @@ public MainPage()
{
....
InitializeComponent();
ResourceDictionary dictionary = new ResourceDictionary();
dictionary.Add("SfAIAssistViewTheme", "CustomTheme");
dictionary.Add("SfAIAssistViewHeaderSuggestionBackground", Colors.LightSkyBlue);
dictionary.Add("SfAIAssistViewHeaderSuggestionItemStroke", Colors.BlueViolet);
dictionary.Add("SfAIAssistViewHeaderSuggestionItemStrokeThickness", 2.0);
dictionary.Add("SfAIAssistViewHeaderSuggestionItemTextColor", Colors.Blue);
dictionary.Add("SfAIAssistViewHeaderSuggestionItemFontSize", 16.0);
dictionary.Add("SfAIAssistViewHeaderSuggestionItemFontAttribute", FontAttributes.Italic);
dictionary.Add("SfAIAssistViewEditorFontFamily", "Roboto-Medium");
dictionary.Add("SfAIAssistViewHeaderSuggestionItemBackground", Colors.White);
this.Resources.Add(dictionary);
ResourceDictionary dictionary = new ResourceDictionary();
dictionary.Add("SfAIAssistViewTheme", "CustomTheme");
dictionary.Add("SfAIAssistViewHeaderSuggestionBackground", Colors.LightSkyBlue);
dictionary.Add("SfAIAssistViewHeaderSuggestionItemStroke", Colors.BlueViolet);
dictionary.Add("SfAIAssistViewHeaderSuggestionItemStrokeThickness", 2.0);
dictionary.Add("SfAIAssistViewHeaderSuggestionItemTextColor", Colors.Blue);
dictionary.Add("SfAIAssistViewHeaderSuggestionItemFontSize", 16.0);
dictionary.Add("SfAIAssistViewHeaderSuggestionItemFontAttribute", FontAttributes.Italic);
dictionary.Add("SfAIAssistViewEditorFontFamily", "Roboto-Medium");
dictionary.Add("SfAIAssistViewHeaderSuggestionItemBackground", Colors.White);
this.Resources.Add(dictionary);
....

}
Expand Down
8 changes: 4 additions & 4 deletions MAUI/AIAssistView/suggestions.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ By providing assistance and encouraging the exploration of new ideas, the common

### Displaying Common Suggestions

Common Suggestions can be populated by creating list of `AssistSuggestion` and assigning it to `SfAIAssistView.Suggestions` API. It will be displayed under the header as part of header view.
Common Suggestions can be populated by creating list of [AssistSuggestion](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.AssistSuggestion.html) and assigning it to [Suggestions](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.SfAIAssistView.html#Syncfusion_Maui_AIAssistView_SfAIAssistView_Suggestions) API. It will be displayed under the header as part of header view.

#### View Model
Create a simple view model as shown in the following code example, and save it as `GettingStartedViewModel.cs` file.
Expand Down Expand Up @@ -109,11 +109,11 @@ public partial class MainPage : ContentPage

![Suggestions in .NET MAUI AI AssistView](Images/suggestions/maui-aiassistview-suggestions-commonsuggestion.png)

N> To view `Suggestion`, it is mandatory to set `ShowHeader` API to `true`.
N> To view [Suggestions](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.SfAIAssistView.html#Syncfusion_Maui_AIAssistView_SfAIAssistView_Suggestions), it is mandatory to set [ShowHeader](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.SfAIAssistView.html#Syncfusion_Maui_AIAssistView_SfAIAssistView_ShowHeader) API to `true`.

### Suggestion Customization

The `SfAIAssistView` control allows you to fully customize the suggestions appearance by using the `SuggestionTemplate` property. This property lets you define a custom layout and style for the suggestion items.
The `SfAIAssistView` control allows you to fully customize the suggestions appearance by using the [SuggestionTemplate](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.SfAIAssistView.html#Syncfusion_Maui_AIAssistView_SfAIAssistView_SuggestionTemplate) property. This property lets you define a custom layout and style for the suggestion items.

{% tabs %}
{% highlight xaml hl_lines="13" %}
Expand Down Expand Up @@ -385,7 +385,7 @@ The [AssistItemSuggestion.ItemSpacing](https://help.syncfusion.com/cr/maui/Syncf
{% endtabs %}

### ResponseItem Suggestion Customization
The `SfAIAssistView` control allows you to fully customize the appearance of the response suggestion items using the `ResponseSuggestionTemplate` property. This property lets you define a custom layout and style for the suggestion item UI.
The `SfAIAssistView` control allows you to fully customize the appearance of the response suggestion items using the [ResponseSuggestionTemplate](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.SfAIAssistView.html#Syncfusion_Maui_AIAssistView_SfAIAssistView_ResponseSuggestionTemplate) property. This property lets you define a custom layout and style for the suggestion item UI.

{% tabs %}
{% highlight xaml hl_lines="11" %}
Expand Down
16 changes: 8 additions & 8 deletions MAUI/AIAssistView/working-with-aiassistview.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public partial class MainPage : ContentPage

## Send Button Customization

The `SfAIAssistView` control allows you to fully customize the send button's appearance using the `RequestButtonTemplate` property. This property lets you define a custom layout and style for the send button.
The `SfAIAssistView` control allows you to fully customize the send button's appearance using the [RequestButtonTemplate](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.SfAIAssistView.html#Syncfusion_Maui_AIAssistView_SfAIAssistView_RequestButtonTemplate) property. This property lets you define a custom layout and style for the send button.

{% tabs %}
{% highlight xaml hl_lines="22" %}
Expand Down Expand Up @@ -403,7 +403,7 @@ public partial class MainPage : ContentPage

## Show ResponseLoader View

By Default, the response loader view will be enabled, and the default shimmer view will be displayed when the request is added. To disable it, set the `ShowResponseLoader` property to `false`.
By Default, the response loader view will be enabled, and the default shimmer view will be displayed when the request is added. To disable it, set the [ShowResponseLoader](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.SfAIAssistView.html#Syncfusion_Maui_AIAssistView_SfAIAssistView_ShowResponseLoader) property to `false`.

{% tabs %}
{% highlight xaml hl_lines="8" %}
Expand Down Expand Up @@ -442,11 +442,11 @@ public partial class MainPage : ContentPage

The `SfAIAssistView` facilitates the customization of both request and response item templates according to specific requirements. This feature enhances flexibility and provides a higher degree of control over the display of items.

By utilizing the template selector, distinct templates can be assigned to all `AssistItems` or to a particular item, allowing for the independent customization of both request and response items. This capability is particularly beneficial when custom item types require different visual representations, offering precise control over the layout and presentation within the assist view.
By utilizing the template selector, distinct templates can be assigned to all [AssistItems](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.AssistItem.html) or to a particular item, allowing for the independent customization of both request and response items. This capability is particularly beneficial when custom item types require different visual representations, offering precise control over the layout and presentation within the assist view.

### Request Item Template

A template can be used to present the data in a way that makes sense for the application by using different controls. `SfAIAssistView` allows customizing the appearance of the Request view by setting the `RequestItemTemplate` property.
A template can be used to present the data in a way that makes sense for the application by using different controls. `SfAIAssistView` allows customizing the appearance of the Request view by setting the [RequestItemTemplate](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.SfAIAssistView.html#Syncfusion_Maui_AIAssistView_SfAIAssistView_RequestItemTemplate) property.

#### Data Model

Expand Down Expand Up @@ -559,7 +559,7 @@ public class GettingStartedViewModel : INotifyPropertyChanged

#### Data Template Selector

Create a custom class that inherits from `RequestItemTemplateSelector`, and override the `OnSelectTemplate` method to return the `DataTemplate` for that item. At runtime, the `SfAIAssistView` invokes the `OnSelectTemplate` method for each item and passes the data object as parameter.
Create a custom class that inherits from [RequestItemTemplateSelector](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.RequestItemTemplateSelector.html), and override the [OnSelectTemplate](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.RequestItemTemplateSelector.html#Syncfusion_Maui_AIAssistView_RequestItemTemplateSelector_OnSelectTemplate_System_Object_Microsoft_Maui_Controls_BindableObject_) method to return the `DataTemplate` for that item. At runtime, the `SfAIAssistView` invokes the `OnSelectTemplate` method for each item and passes the data object as parameter.

{% tabs %}
{% highlight c# tabtitle="TemplateSelector.cs" %}
Expand Down Expand Up @@ -643,7 +643,7 @@ public partial class MainPage : ContentPage

### Response Item Template

A template can be used to present the data in a way that makes sense for the application by using different controls. `SfAIAssistView` allows customizing the appearance of the Response view by setting the `ResponseItemTemplate` property.
A template can be used to present the data in a way that makes sense for the application by using different controls. `SfAIAssistView` allows customizing the appearance of the Response view by setting the [ResponseItemTemplate](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.SfAIAssistView.html#Syncfusion_Maui_AIAssistView_SfAIAssistView_ResponseItemTemplate) property.

#### View Model

Expand Down Expand Up @@ -732,7 +732,7 @@ public class GettingStartedViewModel : INotifyPropertyChanged

#### Data Template Selector

Create a custom class that inherits from `ResponseItemTemplateSelector`, and override the `OnSelectTemplate` method to return the `DataTemplate` for that item. At runtime, the `SfAIAssistView` invokes the `OnSelectTemplate` method for each item and passes the data object as parameter.
Create a custom class that inherits from [ResponseItemTemplateSelector](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.ResponseItemTemplateSelector.html), and override the [OnSelectTemplate](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.ResponseItemTemplateSelector.html#Syncfusion_Maui_AIAssistView_ResponseItemTemplateSelector_OnSelectTemplate_System_Object_Microsoft_Maui_Controls_BindableObject_) method to return the `DataTemplate` for that item. At runtime, the `SfAIAssistView` invokes the `OnSelectTemplate` method for each item and passes the data object as parameter.

{% tabs %}
{% highlight c# tabtitle="TemplateSelector.cs" %}
Expand Down Expand Up @@ -816,7 +816,7 @@ public partial class MainPage : ContentPage

## Text Selection
The `SfAIAssistView` allows for selecting specific phrases or the entire response or request text. It enables the platform specific selection functionalities.
By default, text selection is disabled. To enable it, set the `AllowTextSelection` property to `true`.
By default, text selection is disabled. To enable it, set the [AllowTextSelection](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.SfAIAssistView.html#Syncfusion_Maui_AIAssistView_SfAIAssistView_AllowTextSelection) property to `true`.

{% tabs %}
{% highlight xaml hl_lines="2" %}
Expand Down