Skip to content

Commit 7f15907

Browse files
Merge branch 'development' of https://github.com/syncfusion-content/maui-docs into datagrid-liquidglassUG
2 parents 00c9178 + 9174f00 commit 7f15907

File tree

71 files changed

+1656
-881
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1656
-881
lines changed
10 KB
Loading
-126 KB
Loading

MAUI/AIAssistView/items.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ The following views can be customized individually:
502502
- `CardButtonView` – Represents an action button inside a card item; exposes Title and Value bindable properties
503503

504504
{% tabs %}
505-
{% highlight xaml hl_lines="12 27" %}
505+
{% highlight xaml hl_lines="14 30" %}
506506

507507
<?xml version="1.0" encoding="utf-8"?>
508508
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
@@ -559,7 +559,7 @@ The following views can be customized individually:
559559
</ContentPage>
560560

561561
{% endhighlight %}
562-
{% highlight c# hl_lines="18 41" %}
562+
{% highlight c# hl_lines="23 47" %}
563563

564564
using Syncfusion.Maui.AIAssistView;
565565

MAUI/AIAssistView/styles.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,3 +1293,67 @@ public MainPage()
12931293

12941294
{% endhighlight %}
12951295
{% endtabs %}
1296+
1297+
## Response suggestion header text style
1298+
1299+
To style the response suggestion header text view based on its appearance, set values to the in-built keys in the resource dictionary.
1300+
1301+
<table>
1302+
<tr>
1303+
<th> Key </th>
1304+
<th> Description </th>
1305+
</tr>
1306+
<tr>
1307+
<td> SfAIAssistViewSuggestionHeaderTextColor </td>
1308+
<td> Text color of response suggestion header text. </td>
1309+
</tr>
1310+
<tr>
1311+
<td> SfAIAssistViewSuggestionHeaderFontSize </td>
1312+
<td> Font size of response suggestion header text. </td>
1313+
</tr>
1314+
<tr>
1315+
<td> SfAIAssistViewSuggestionHeaderFontFamily </td>
1316+
<td> Font family of response suggestion header text. </td>
1317+
</tr>
1318+
<tr>
1319+
<td> SfAIAssistViewSuggestionHeaderFontAttributes </td>
1320+
<td> Font attributes of response suggestion header text. </td>
1321+
</tr>
1322+
</table>
1323+
1324+
{% tabs %}
1325+
{% highlight xaml %}
1326+
1327+
<ContentPage.Resources>
1328+
<syncTheme:SyncfusionThemeDictionary>
1329+
<syncTheme:SyncfusionThemeDictionary.MergedDictionaries>
1330+
<ResourceDictionary>
1331+
<x:String x:Key="SfAIAssistViewTheme">CustomTheme</x:String>
1332+
<Color x:Key="SfAIAssistViewSuggestionHeaderTextColor">DarkBlue</Color>
1333+
<x:Double x:Key="SfAIAssistViewSuggestionHeaderFontSize">14</x:Double>
1334+
<x:String x:Key="SfAIAssistViewSuggestionHeaderFontFamily">Roboto-Medium</x:String>
1335+
<FontAttributes x:Key="SfAIAssistViewSuggestionHeaderFontAttributes">Bold</FontAttributes>
1336+
</ResourceDictionary>
1337+
</syncTheme:SyncfusionThemeDictionary.MergedDictionaries>
1338+
</syncTheme:SyncfusionThemeDictionary>
1339+
</ContentPage.Resources>
1340+
1341+
{% endhighlight %}
1342+
{% highlight c# %}
1343+
1344+
public MainPage()
1345+
{
1346+
....
1347+
InitializeComponent();
1348+
ResourceDictionary dictionary = new ResourceDictionary();
1349+
dictionary.Add("SfAIAssistViewTheme", "CustomTheme");
1350+
dictionary.Add("SfAIAssistViewSuggestionHeaderTextColor", Colors.DarkBlue);
1351+
dictionary.Add("SfAIAssistViewSuggestionHeaderFontSize", 14);
1352+
dictionary.Add("SfAIAssistViewSuggestionHeaderFontFamily", "Roboto-Medium");
1353+
dictionary.Add("SfAIAssistViewSuggestionHeaderFontAttributes", FontAttributes.Bold);
1354+
this.Resources.Add(dictionary);
1355+
....
1356+
}
1357+
1358+
{% endhighlight %}
1359+
{% endtabs %}

MAUI/AIAssistView/suggestions.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,44 @@ The [AssistItemSuggestion.ItemSpacing](https://help.syncfusion.com/cr/maui/Syncf
384384
{% endhighlight %}
385385
{% endtabs %}
386386

387+
### Response item suggestion header
388+
389+
The `SfAIAssistView` control allows you to define the header text for each response suggestion by setting a custom text to the `AssistItem.SuggestionHeaderText` property, ensuring clear identification and context for each suggestion group displayed to users.
390+
391+
{% tabs %}
392+
{% highlight c# tabtitle="ViewModel.cs" hl_lines="19" %}
393+
394+
...
395+
private async Task GetResult(AssistItem requestItem)
396+
{
397+
await Task.Delay(1000).ConfigureAwait(true);
398+
399+
AssistItem responseItem = new AssistItem()
400+
{
401+
Text = "MAUI stands for .NET Multi-platform App UI. It's a .NET framework for building cross-platform apps with a single C# codebase for iOS, Android, macOS, and Windows. Sure! Here's a link to learn more about .NET MAUI",
402+
};
403+
404+
var assistSuggestions = new AssistItemSuggestion();
405+
406+
suggestions = new ObservableCollection<ISuggestion>();
407+
suggestions.Add(new AssistSuggestion() { Text = "Get started with .NET MAUI" });
408+
suggestions.Add(new AssistSuggestion() { Text = "Build your first MAUI app" });
409+
410+
assistSuggestions.Items = suggestions;
411+
412+
assistSuggestions.SuggestionHeaderText = "Related Topics";
413+
414+
// Assign suggestions to response item.
415+
responseItem.Suggestion = assistSuggestions;
416+
this.AssistItems.Add(responseItem);
417+
}
418+
...
419+
420+
{% endhighlight %}
421+
{% endtabs %}
422+
423+
![Suggestion Header Text in .NET MAUI AI AssistView](Images/suggestions/maui-aiassistview-suggestion-headertext.png)
424+
387425
### Response item suggestion customization
388426
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.
389427

@@ -435,7 +473,6 @@ public partial class MainPage : ContentPage
435473

436474
![Suggestion Template in .NET MAUI AI AssistView](Images/suggestions/maui-aiassistview-suggestiontemplate.png)
437475

438-
439476
## Event and Commands
440477

441478
When a user selects a suggestion, the [SuggestionItemSelected](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.SfAIAssistView.html#Syncfusion_Maui_AIAssistView_SfAIAssistView_SuggestionItemSelected) event and [SuggestionItemSelectedCommand](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.SfAIAssistView.html#Syncfusion_Maui_AIAssistView_SfAIAssistView_SuggestionItemSelectedCommand) are triggered, providing [SuggestionItemSelectedEventArgs](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.SuggestionItemSelectedEventArgs.html) as arguments. This arguments contains the following details about the selected suggestion item.

MAUI/AIAssistView/working-with-aiassistview.md

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ N> [View sample in GitHub](https://github.com/SyncfusionExamples/custom-control-
267267

268268
The `SfAIAssistView` allows you to edit a previously sent request. This feature lets users review and refine the prompt and resubmit from the editor to get more accurate responses. Each request shows an Edit icon; when tapped, the request text is placed in the editor (InputView) to redefine.
269269

270-
N> Interaction: On desktop (Windows, macOS), hover over a request to reveal the Edit icon. On mobile (Android, iOS), tap the request to show the Edit option.
270+
N> **Interaction**: On desktop (Windows, macOS), hover over a request to reveal the Edit icon. On mobile (Android, iOS), tap the request to show the Edit option.
271271

272272
![Edit Option in .NET MAUI AI AssistView](Images/working-with-aiassistview/maui-aiassistview-editoption.gif)
273273

@@ -276,7 +276,7 @@ N> Interaction: On desktop (Windows, macOS), hover over a request to reveal the
276276
The `SfAIAssistView` control allows you to fully customize the editor's appearance by using the [EditorViewTemplate](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.AIAssistView.SfAIAssistView.html#Syncfusion_Maui_AIAssistView_SfAIAssistView_EditorViewTemplate) property. This property lets you define a custom layout and style for the editor.
277277

278278
{% tabs %}
279-
{% highlight xaml tabtitle="MainPage.xaml" hl_lines="13" %}
279+
{% highlight xaml hl_lines="13" %}
280280

281281
<ContentPage.Resources>
282282
<ResourceDictionary>
@@ -340,14 +340,14 @@ public partial class MainPage : ContentPage
340340
The `SfAIAssistView` can display a quick action icon inside the editor. To enable the action button, set the `ShowActionButtons` property to `true`.
341341

342342
{% tabs %}
343-
{% highlight xaml tabtitle="MainPage.xaml" hl_lines="2" %}
343+
{% highlight xaml hl_lines="2" %}
344344

345345
<syncfusion:SfAIAssistView x:Name="sfAIAssistView"
346346
ShowActionButtons="True" />
347347

348348
{% endhighlight %}
349349

350-
{% highlight c# tabtitle="MainPage.xaml.cs" hl_lines="10" %}
350+
{% highlight c# hl_lines="10" %}
351351

352352
using Syncfusion.Maui.AIAssistView;
353353

@@ -376,21 +376,20 @@ Bind the `ActionButtons` collection with one or more `ActionButton` items to pop
376376
- `CommandParameter`: Passes a parameter to the command when executed.
377377

378378
{% tabs %}
379-
{% highlight xaml tabtitle="MainPage.xaml" hl_lines="4 5 6 7 8" %}
379+
{% highlight xaml hl_lines="4 5 6 7" %}
380380

381381
<syncfusion:SfAIAssistView x:Name="sfAIAssistView"
382382
ShowActionButtons="True"
383383
AssistItems="{Binding AssistItems}">
384384
<syncfusion:SfAIAssistView.ActionButtons>
385-
<syncfusion:ActionButton Text="Copy" Icon="copy.png" Command="{Binding CopyCommand}" />
386-
<syncfusion:ActionButton Text="Clear" Icon="trash.png" Command="{Binding ClearCommand}" />
387-
<syncfusion:ActionButton Text="Share" Icon="share.png" Command="{Binding ShareCommand}" />
385+
<syncfusion:ActionButton Text="Upload images" Icon="image.png" Command="{Binding UploadCommand}" />
386+
<syncfusion:ActionButton Text="Search in web" Icon="web.png" Command="{Binding SearchCommand}" />
388387
</syncfusion:SfAIAssistView.ActionButtons>
389388
</syncfusion:SfAIAssistView>
390389

391390
{% endhighlight %}
392391

393-
{% highlight c# tabtitle="MainPage.xaml.cs" hl_lines="15 17 23 29" %}
392+
{% highlight c# hl_lines="15 17 23" %}
394393

395394
using Syncfusion.Maui.AIAssistView;
396395

@@ -410,22 +409,16 @@ public partial class MainPage : ContentPage
410409
{
411410
new ActionButton
412411
{
413-
Text = "Copy",
414-
Icon = ImageSource.FromFile("copy.png"),
415-
Command = this.viewModel.CopyCommand
412+
Text = "Upload images",
413+
Icon = ImageSource.FromFile("image.png"),
414+
Command = this.viewModel.UploadCommand
416415
},
417416
new ActionButton
418417
{
419-
Text = "Clear",
420-
Icon = ImageSource.FromFile("trash.png"),
421-
Command = this.viewModel.ClearCommand
418+
Text = "Search in web",
419+
Icon = ImageSource.FromFile("web.png"),
420+
Command = this.viewModel.SearchCommand
422421
},
423-
new ActionButton
424-
{
425-
Text = "Share",
426-
Icon = ImageSource.FromFile("share.png"),
427-
Command = this.viewModel.ShareCommand
428-
}
429422
};
430423

431424
this.Content = sfAIAssistView;
@@ -1008,14 +1001,14 @@ public partial class MainPage : ContentPage
10081001
The `SfAIAssistView` control provides an option to display a scroll-to-bottom button that helps users quickly navigate back to the latest responses when they have scrolled up in the AI conversation. To enable this, set the `ShowScrollToBottomButton` property to `true`.
10091002

10101003
{% tabs %}
1011-
{% highlight xaml tabtitle="MainPage.xaml" hl_lines="3" %}
1004+
{% highlight xaml hl_lines="3" %}
10121005

10131006
<syncfusion:SfAIAssistView x:Name="sfAIAssistView"
10141007
AssistItems="{Binding AssistItems}"
10151008
ShowScrollToBottomButton="True" />
10161009

10171010
{% endhighlight %}
1018-
{% highlight c# tabtitle="MainPage.xaml.cs" hl_lines="10" %}
1011+
{% highlight c# hl_lines="10" %}
10191012

10201013
using Syncfusion.Maui.AIAssistView;
10211014

@@ -1041,7 +1034,7 @@ public partial class MainPage : ContentPage
10411034
The `SfAIAssistView` control allows you to fully customize the scroll-to-bottom button appearance by using the `ScrollToBottomButtonTemplate` property. This property lets you define a custom layout and style.
10421035

10431036
{% tabs %}
1044-
{% highlight xaml tabtitle="MainPage.xaml" hl_lines="12" %}
1037+
{% highlight xaml hl_lines="12" %}
10451038

10461039
<ContentPage.Resources>
10471040
<ResourceDictionary>
@@ -1057,7 +1050,7 @@ The `SfAIAssistView` control allows you to fully customize the scroll-to-bottom
10571050
ScrollToBottomButtonTemplate="{StaticResource scrollToBottomButtonTemplate}" />
10581051

10591052
{% endhighlight %}
1060-
{% highlight c# tabtitle="MainPage.xaml.cs" hl_lines="10" %}
1053+
{% highlight c# hl_lines="11" %}
10611054

10621055
using Syncfusion.Maui.AIAssistView;
10631056

78.7 KB
Loading

MAUI/Autocomplete/LiquidGlassSupport.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ control: SfAutocomplete
77
documentation: ug
88
---
99

10-
# Liquid glass support
10+
# Liquid Glass Support for .NET MAUI Autocomplete
1111

12-
The [SfAutocomplete](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Inputs.SfAutocomplete.html) supports a liquid `glass` appearance by hosting the control inside the Syncfusion [SfGlassEffectsView](). You can customize the effect using properties such as [EffectType](), [EnableShadowEffect](), and round the corners using [CornerRadius](). This approach improves visual depth and readability when SfAutocomplete is placed over images or colorful layouts. Additionally, the dropdown portion of SfAutocomplete applies the glass effect only when the [EnableLiquidGlassEffect]() property is set to true.
12+
The [SfAutocomplete](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Inputs.SfAutocomplete.html) supports a `liquid glass` appearance by hosting the control inside the Syncfusion [SfGlassEffectView](). You can customize the effect using properties such as [EffectType](), [EnableShadowEffect](), and round the corners using [CornerRadius](). This approach improves visual depth and readability when SfAutocomplete is placed over images or colorful layouts. Additionally, the dropdown portion of SfAutocomplete applies the glass effect only when the [EnableLiquidGlassEffect]() property is set to true.
1313

1414
## Availability
1515

@@ -19,12 +19,12 @@ The [SfAutocomplete](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Inputs.
1919

2020
## Prerequisites
2121

22-
- Add the Syncfusion.Maui.Core package (for SfGlassEffectsView) and Syncfusion.Maui.Inputs (for SfAutocomplete).
22+
- Add the Syncfusion.Maui.Core package (for SfGlassEffectView) and Syncfusion.Maui.Inputs (for SfAutocomplete).
2323

24-
XAML example Wrap the SfAutocomplete in an SfGlassEffectsView, then enable the dropdown’s glass effect with `EnableLiquidGlassEffect`.
24+
XAML example Wrap the SfAutocomplete in an SfGlassEffectView, then enable the dropdown’s glass effect with `EnableLiquidGlassEffect`.
2525

2626
{% tabs %}
27-
{% highlight xaml hl_lines="49 52" %}
27+
{% highlight xaml hl_lines="19 22" %}
2828

2929
<?xml version="1.0" encoding="utf-8" ?>
3030
<ContentPage
@@ -37,29 +37,30 @@ XAML example Wrap the SfAutocomplete in an SfGlassEffectsView, then enable the d
3737
<Grid>
3838
<!-- Background to make acrylic blur visible -->
3939
<Image Source="wallpaper.jpg" Aspect="AspectFill" />
40-
<core:SfGlassEffectsView
40+
<core:SfGlassEffectView
4141
CornerRadius="20"
4242
HeightRequest="40"
4343
EffectType="Regular"
4444
EnableShadowEffect="True">
4545

4646
<inputs:SfAutocomplete
4747
EnableLiquidGlassEffect="True"
48+
Background="Transparent"
4849
ItemsSource="{Binding Employees}"
4950
DisplayMemberPath="Name"
5051
DropDownBackground="Transparent"
5152
Placeholder="Select employee"/>
52-
</core:SfGlassEffectsView>
53+
</core:SfGlassEffectView>
5354
</Grid>
5455
</ContentPage>
5556

5657
{% endhighlight %}
57-
{% highlight c# hl_lines="74 77" %}
58+
{% highlight c# hl_lines="14 17" %}
5859

5960
using Syncfusion.Maui.Core;
6061
using Syncfusion.Maui.Inputs;
6162

62-
var glassEffects = new SfGlassEffectsView
63+
var glassEffects = new SfGlassEffectView
6364
{
6465
CornerRadius=20,
6566
HeightRequest=40,
@@ -72,6 +73,7 @@ var Autocomplete = new SfAutocomplete
7273
EnableLiquidGlassEffect = true, // Dropdown glass effect
7374
ItemsSource = viewModel.Employees,
7475
DisplayMemberPath = "Name",
76+
Background=Colors.Transparent,
7577
DropDownBackground= Colors.Transparent,
7678
Placeholder = "Select employee",
7779
};
@@ -82,4 +84,6 @@ glassEffects.Content = Autocomplete;
8284
{% endtabs %}
8385

8486

85-
The following screenshot illustrates SfAutocomplete within an acrylic container, with the dropdown using the glass effect.
87+
The following screenshot illustrates SfAutocomplete within an acrylic container, with the dropdown using the glass effect.
88+
89+
![Autocomplete editor with liquid glass support](Images/UICustomization/Autocomplete_liquidglass.png)
72.3 KB
Loading

MAUI/Button/LiquidGlassSupport.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ control: SfButton
77
documentation: ug
88
---
99

10-
# Liquid glass support
10+
# Liquid Glass Support for .NET MAUI Buttons
1111

1212
The [SfButton](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfButton.html) provides `liquid glass` effect that gives the button a frosted, translucent appearance blending with the content behind it. When the glass effect is enabled, the button also scales while it is pressed, delivering a subtle, responsive interaction cue. This enhances visual depth and interactivity, especially when the button is placed over images or colorful layouts.
1313

@@ -20,7 +20,7 @@ The [SfButton](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfBut
2020
XAML example Enable the glass effect on `SfButton`. When pressed, the button will `scale` while the effect is enabled.
2121

2222
{% tabs %}
23-
{% highlight xaml hl_lines="49 52" %}
23+
{% highlight xaml hl_lines="16 17" %}
2424

2525
<?xml version="1.0" encoding="utf-8" ?>
2626
<ContentPage
@@ -38,6 +38,7 @@ XAML example Enable the glass effect on `SfButton`. When pressed, the button wil
3838
x:Name="GlassButton"
3939
Text="Continue"
4040
EnableLiquidGlassEffect="True"
41+
Background="Transparent"
4142
WidthRequest="180"
4243
CornerRadius="24"
4344
HeightRequest="48" />
@@ -46,7 +47,7 @@ XAML example Enable the glass effect on `SfButton`. When pressed, the button wil
4647
</ContentPage>
4748

4849
{% endhighlight %}
49-
{% highlight c# hl_lines="74 77" %}
50+
{% highlight c# hl_lines="7 9" %}
5051

5152
using Syncfusion.Maui.Buttons;
5253

@@ -56,10 +57,13 @@ var glassButton = new SfButton
5657
AutomationId = "Acrylic Button",
5758
EnableLiquidGlassEffect = true, // Enables glass look and press-time scaling
5859
WidthRequest = 180,
60+
Background=Colors.Transparent;
5961
HeightRequest = 48
6062
};
6163

6264
{% endhighlight %}
6365
{% endtabs %}
6466

65-
The following screenshot illustrates SfButton with the glass effect enabled and the pressed-state scaling behavior over a wallpaper background.
67+
The following screenshot illustrates SfButton with the glass effect enabled and the pressed-state scaling behavior over a wallpaper background.
68+
69+
![button with liquid glass support](Images/customization-images/Button_liquidglass.png)

0 commit comments

Comments
 (0)