diff --git a/MAUI/AIAssistView/styles.md b/MAUI/AIAssistView/styles.md index d2f2e25762..fd445df905 100644 --- a/MAUI/AIAssistView/styles.md +++ b/MAUI/AIAssistView/styles.md @@ -622,6 +622,96 @@ To apply styles to the elements of a card item, set values to the in-built keys {% endhighlight %} {% endtabs %} +## Error message Styling + +To apply styles to the elements of an error message, you can set values to the built-in keys of the error message item in the resource dictionary. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyDescription
SfAIAssistViewErrorIconColorDefines the color of the error icon.
SfAIAssistViewErrorIconFontSizeDefines the font size of the error icon.
SfAIAssistViewErrorIconFontFamilyDefines the font family of the error icon.
SfAIAssistViewErrorIconDefines the actual character/glyph for the error icon.
SfAIAssistViewErrorIconFontAttributesDefines the font attributes for the error icon.
SfAIAssistViewErrorMessageTextColorDefines the text color of the error message.
SfAIAssistViewErrorMessageFontSizeDefines the font size of the error message.
SfAIAssistViewErrorMessageFontFamilyDefines the font family of the error message.
SfAIAssistViewErrorMessageFontAttributesDefines the font attributes for the error message.
+ +{% tabs %} +{% highlight xaml %} + + + + + + #FF8C00 + 16 + Roboto-Medium + + Bold + #eb5050 + 14 + Roboto-Medium + Italic + + + + + +{% endhighlight %} +{% highlight c# %} + + public MainPage() + { + .... + InitializeComponent(); + dictionary.Add("SfAIAssistViewErrorIconColor", Color.FromHex("#FF8C00")); + dictionary.Add("SfAIAssistViewErrorIconFontSize", 16d); + dictionary.Add("SfAIAssistViewErrorIconFontFamily", "Roboto-Medium"); + dictionary.Add("SfAIAssistViewErrorIcon", "\ue7a0"); + dictionary.Add("SfAIAssistViewErrorIconFontAttributes", FontAttributes.Bold); + dictionary.Add("SfAIAssistViewErrorMessageTextColor", Color.FromHex("#eb5050")); + dictionary.Add("SfAIAssistViewErrorMessageFontSize", 14d); + dictionary.Add("SfAIAssistViewErrorMessageFontFamily", "Roboto-Medium"); + dictionary.Add("SfAIAssistViewErrorMessageFontAttributes", FontAttributes.Italic); + .... + } + +{% endhighlight %} +{% endtabs %} + ## Item input view styling To apply styles to the elements of the input view, set values to the in-built keys of the input view in the resource dictionary. diff --git a/MAUI/Themes/Keys.md b/MAUI/Themes/Keys.md index cc950a2cc1..c0a4bcfa2a 100644 --- a/MAUI/Themes/Keys.md +++ b/MAUI/Themes/Keys.md @@ -438,6 +438,38 @@ This page lists the keys associated with each control and the respective UI elem SfAIAssistViewSuggestionBackground

Background color of the suggestion.

+ + SfAIAssistViewErrorIconColor

+ Defines the color of the error icon.

+ + + SfAIAssistViewErrorIconFontSize

+ Defines the font size of the error icon.

+ + + SfAIAssistViewErrorIconFontFamily

+ Defines the font family of the error icon.

+ + + SfAIAssistViewErrorIconFontAttributes

+ Defines the font attributes for the error icon.

+ + + SfAIAssistViewErrorMessageTextColor

+ Defines the text color of the error message.

+ + + SfAIAssistViewErrorMessageFontSize

+ Defines the font size of the error message.

+ + + SfAIAssistViewErrorMessageFontFamily

+ Defines the font family of the error message.

+ + + SfAIAssistViewErrorMessageFontAttributes

+ Defines the font attributes for the error message.

+ SfAIAssistViewSuggestionItemTextColor

Text color of suggestion list items.