Skip to content

Commit 875fa55

Browse files
Merge branch 'development' of https://github.com/syncfusion-content/maui-docs into 998547
2 parents f7934dc + 1fec61d commit 875fa55

File tree

68 files changed

+2218
-1109
lines changed

Some content is hidden

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

68 files changed

+2218
-1109
lines changed
59.7 KB
Loading
224 KB
Loading
8.96 KB
Loading
99.6 KB
Loading
30 KB
Loading

MAUI/AIAssistView/items.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -483,19 +483,19 @@ public class ViewModel : INotifyPropertyChanged
483483

484484
![Error message in .NET MAUI AI AssistView](images/maui-aiassistview-error-message.png)
485485

486-
## Customizable (Targetable) views
486+
## Customizable views
487487

488488
The `SfAIAssistView` allows you to customize specific parts of request and response items without changing the entire UI. You can apply styles, templates, or subclass these views to create custom visuals and behavior.
489489

490490
The following views can be customized individually:
491491

492492
- `RequestTextView` – Represents the user request text content.
493493
- `RequestAssistImageView` – Represents the user request image content.
494-
- `RequestHyperlinkUrlLableView` – Represents the user request URL label area.
494+
- `RequestHyperlinkUrlLabelView` – Represents the user request URL label area.
495495
- `RequestHyperLinkDetailsViewFrameView` – Represents the user request URL details/preview frame area.
496496
- `ResponseTextView` – Represents the AI response text content.
497497
- `ResponseAssistImageView` – Represents the AI response image content.
498-
- `ResponseHyperlinkUrlLableView` – Represents the AI response URL label area.
498+
- `ResponseHyperlinkUrlLabelView` – Represents the AI response URL label area.
499499
- `ResponseHyperLinkDetailsViewFrameView` – Represents the AI response URL details/preview frame area.
500500
- `ResponseCardView` – Represents the container for card-based AI responses.
501501
- `CardItemView` – Represents a single card item within a response.
@@ -521,11 +521,11 @@ The following views can be customized individually:
521521
<Setter Property="ControlTemplate">
522522
<Setter.Value>
523523
<ControlTemplate>
524-
<Grid Padding="8" Background="Beige">
524+
<Grid Padding="8" BackgroundColor="{DynamicResource SecondaryContainer}">
525525
<Label
526526
Text="{Binding Text}"
527527
FontSize="13"
528-
TextColor="Black" />
528+
TextColor="{DynamicResource OnSecondaryContainer}" />
529529
</Grid>
530530
</ControlTemplate>
531531
</Setter.Value>
@@ -537,12 +537,12 @@ The following views can be customized individually:
537537
<Setter Property="ControlTemplate">
538538
<Setter.Value>
539539
<ControlTemplate>
540-
<Grid Padding="10" Background="LightSkyBlue">
540+
<Grid Padding="10" BackgroundColor="{DynamicResource PrimaryContainer}">
541541
<Label
542542
Text="{Binding Text}"
543543
FontSize="13"
544544
FontAttributes="Italic"
545-
TextColor="White" />
545+
TextColor="{DynamicResource OnPrimaryContainer}" />
546546
</Grid>
547547
</ControlTemplate>
548548
</Setter.Value>
@@ -592,7 +592,7 @@ namespace MauiAIAssistView
592592
Property = RequestTextView.ControlTemplateProperty,
593593
Value = new ControlTemplate(() =>
594594
{
595-
var grid = new Grid { Padding = 8, Background = Colors.Beige };
595+
var grid = new Grid { Padding = 8, BackgroundColor = Colors.Beige };
596596
var label = new Label
597597
{
598598
FontSize = 13,
@@ -616,7 +616,7 @@ namespace MauiAIAssistView
616616
Property = ResponseTextView.ControlTemplateProperty,
617617
Value = new ControlTemplate(() =>
618618
{
619-
var grid = new Grid { Padding = 10, Background = Colors.LightSkyBlue };
619+
var grid = new Grid { Padding = 10, BackgroundColor = Colors.LightSkyBlue };
620620
var label = new Label
621621
{
622622
FontSize = 13,

MAUI/AIAssistView/working-with-aiassistview.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ The `SfAIAssistView` allows you to edit a previously sent request. This feature
269269

270270
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

272+
![Edit Option in .NET MAUI AI AssistView](Images/working-with-aiassistview/maui-aiassistview-editoption.gif)
273+
272274
## EditorView template
273275

274276
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.
@@ -433,6 +435,8 @@ public partial class MainPage : ContentPage
433435
{% endhighlight %}
434436
{% endtabs %}
435437

438+
![Action Buttons in .NET MAUI AI AssistView](Images/working-with-aiassistview/maui-aiassistview-actionbuttons.gif)
439+
436440
## Request button customization
437441

438442
### Request button icon
@@ -445,9 +449,9 @@ The `SfAIAssistView` control allows you to customize the request button icon by
445449
<syncfusion:SfAIAssistView x:Name="sfAIAssistView"
446450
AssistItems="{Binding AssistItems}">
447451
<syncfusion:SfAIAssistView.RequestButtonIcon>
448-
<FontImageSource Glyph="&#xe791;"
452+
<FontImageSource Glyph="&#xe809;"
449453
FontFamily="MauiMaterialAssets"
450-
Color="Green" />
454+
Color="Black" />
451455
</syncfusion:SfAIAssistView.RequestButtonIcon>
452456
</syncfusion:SfAIAssistView>
453457

@@ -465,7 +469,7 @@ public partial class MainPage : ContentPage
465469
sfAIAssistView = new SfAIAssistView();
466470
sfAIAssistView.RequestButtonIcon = new FontImageSource
467471
{
468-
Glyph = "\ue791;",
472+
Glyph = "\ue809;",
469473
FontFamily = "MauiMaterialAssets",
470474
Color = Colors.Green
471475
};
@@ -476,7 +480,9 @@ public partial class MainPage : ContentPage
476480
{% endhighlight %}
477481
{% endtabs %}
478482

479-
### Request button temlpate
483+
![Request Button Icon in .NET MAUI AI AssistView](Images/working-with-aiassistview/maui-aiassistview-requestbutton.png)
484+
485+
### Request button template
480486

481487
The `SfAIAssistView` control allows you to fully customize the request 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.
482488

@@ -1028,6 +1034,8 @@ public partial class MainPage : ContentPage
10281034
{% endhighlight %}
10291035
{% endtabs %}
10301036

1037+
![Scroll-To-Buttom in .NET MAUI AI AssistView](Images/working-with-aiassistview/maui-aiassistview-scrolltobottom.gif)
1038+
10311039
### Scroll to bottom button customization
10321040

10331041
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.
@@ -1076,3 +1084,5 @@ public partial class MainPage : ContentPage
10761084

10771085
{% endhighlight %}
10781086
{% endtabs %}
1087+
1088+
![Scroll-To-Buttom Template in .NET MAUI AI AssistView](Images/working-with-aiassistview/maui-aiassistview-scrolltobottomtemplate.png)
-246 Bytes
Loading
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
---
2+
layout: post
3+
title: Cupertino Theme in .NET MAUI Cartesian Chart control | Syncfusion
4+
description: Learn how to enable and customize the Liquid Glass visual effect in Syncfusion® .NET MAUI Chart (SfCartesianChart) for stunning UI..
5+
platform: maui
6+
control: SfCartesianChart
7+
documentation: ug
8+
keywords: .net maui chart, cupertino theme, glass effect, maui cupertino chart, cupertino cartesian tooltip maui, .net maui chart visualization, cupertino cartesian trackball maui.
9+
---
10+
11+
# Cupertino Theme in .NET MAUI Cartesian Chart
12+
13+
The Cupertino theme is a modern design style that provides a sleek, minimalist appearance with clean lines, subtle visual effects, and elegant styling. It features smooth rounded corners and sophisticated visual treatments that create a polished, professional look for your charts.
14+
15+
N> The Cupertino liquid glass effect is only available on macOS and iOS platforms with iOS version 26 or higher.
16+
17+
## How it Enhances Chart UI on macOS and iOS
18+
19+
The Cupertino theme enhances chart interactivity with liquid glass effects on tooltips and trackballs, creating a modern and visually appealing data visualization interface that delivers a sophisticated user experience.
20+
21+
## Enable Cupertino Theme
22+
23+
To Enable Cupertino Theme effect by setting `True` to [EnableLiquidGlassEffect]() property of SfCartesianChart.
24+
25+
{% tabs %}
26+
27+
{% highlight xaml %}
28+
29+
<chart:SfCartesianChart EnableLiquidGlassEffect="True">
30+
. . .
31+
</chart:SfCartesianChart>
32+
33+
{% endhighlight %}
34+
35+
{% highlight c# %}
36+
37+
SfCartesianChart chart = new SfCartesianChart();
38+
chart.EnableLiquidGlassEffect = true;
39+
. . .
40+
41+
this.Content = chart;
42+
43+
{% endhighlight %}
44+
45+
{% endtabs %}
46+
47+
### Tooltip
48+
49+
To Enable Cupertino Theme effect to the tooltip, set `True` to [EnableLiquidGlassEffect]() property of SfCartesianChart and [EnableTooltip](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.ChartSeries.html#Syncfusion_Maui_Charts_ChartSeries_EnableTooltip) property of ChartSeries.
50+
51+
{% tabs %}
52+
53+
{% highlight xaml %}
54+
55+
<chart:SfCartesianChart EnableLiquidGlassEffect="True">
56+
. . .
57+
<chart:ColumnSeries ItemsSource="{Binding Data}"
58+
XBindingPath="Category"
59+
YBindingPath="Value"
60+
EnableTooltip="True">
61+
</chart:ColumnSeries>
62+
</chart:SfCartesianChart>
63+
64+
{% endhighlight %}
65+
66+
{% highlight c# %}
67+
68+
SfCartesianChart chart = new SfCartesianChart();
69+
chart.EnableLiquidGlassEffect = true;
70+
. . .
71+
ColumnSeries series = new ColumnSeries()
72+
{
73+
ItemsSource = viewModel.Data,
74+
XBindingPath = "Category",
75+
YBindingPath = "Value",
76+
EnableTooltip = true
77+
};
78+
79+
chart.Series.Add(series);
80+
this.Content = chart;
81+
82+
{% endhighlight %}
83+
84+
{% endtabs %}
85+
86+
N> When using a custom tooltip template using [TooltipTemplate](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.ChartSeries.html#Syncfusion_Maui_Charts_ChartSeries_TooltipTemplate), set the background to transparent to display the liquid glass effect.
87+
88+
### Trackball
89+
90+
To Enable Cupertino Theme effect to the tooltip, set `True` to [EnableLiquidGlassEffect]() property of SfCartesianChart and [ShowTrackballLabel](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.CartesianSeries.html#Syncfusion_Maui_Charts_CartesianSeries_ShowTrackballLabel) property of ChartSeries
91+
92+
{% tabs %}
93+
94+
{% highlight xaml %}
95+
96+
<chart:SfCartesianChart EnableLiquidGlassEffect="True">
97+
. . .
98+
<chart:LineSeries ItemsSource="{Binding Data}"
99+
XBindingPath="Category"
100+
YBindingPath="Value"
101+
ShowTrackballLabel="True">
102+
</chart:LineSeries>
103+
</chart:SfCartesianChart>
104+
105+
{% endhighlight %}
106+
107+
{% highlight c# %}
108+
109+
SfCartesianChart chart = new SfCartesianChart();
110+
chart.EnableLiquidGlassEffect = true;
111+
. . .
112+
LineSeries series = new LineSeries()
113+
{
114+
ItemsSource = viewModel.Data,
115+
XBindingPath = "Category",
116+
YBindingPath = "Value",
117+
ShowTrackballLabel = true
118+
};
119+
120+
chart.Series.Add(series);
121+
this.Content = chart;
122+
123+
{% endhighlight %}
124+
125+
{% endtabs %}
126+
127+
N> When using a custom tooltip template using [TrackballLabelTemplate](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.CartesianSeries.html#Syncfusion_Maui_Charts_CartesianSeries_TrackballLabelTemplate), set the background to transparent to display the liquid glass effect.
128+
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
layout: post
3+
title: Show tooltip and datalabels in release mode | Syncfusion
4+
description: Learn here all about displaying tooltip and datalabels in release mode in SfCartesianChart in Syncfusion® .NET MAUI Chart (SfCartesianChart) control.
5+
platform: maui
6+
control: SfCartesianChart
7+
documentation: ug
8+
keywords: .NET MAUI chart tooltip, .NET MAUI chart data label, TooltipInfo Item binding, ChartDataLabel Item binding, Release mode trimming, Preserve attribute MAUI.
9+
---
10+
11+
# Display tooltip and data labels in release mode
12+
In [SfCartesianChart](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.SfCartesianChart.html), tooltip and data label templates do not bind directly to your business model because these elements are generated by the chart at runtime and often represent calculated points. As a result, the chart provides its own binding context containing the necessary metadata. For tooltips this context is [TooltipInfo](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.TooltipInfo.html), and for data labels it is [ChartDataLabel](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.ChartDataLabel.html). Both expose an Item property that points back to your original business model when a direct mapping exists. With .NET 9 compiled bindings, set **x:DataType="chart:TooltipInfo"** for tooltip templates and **x:DataType="chart:ChartDataLabel"** for data label templates, then bind through Item. If you need a specific field from your model, bind to Item and use a value converter to extract the desired property.
13+
14+
`Ahead-of-Time (AOT)` compilation converts Intermediate Language to native code at build time to improve startup and runtime performance. AOT commonly ships together with linker trimming in Release configurations to reduce app size.
15+
16+
Because Release builds enable trimming, members referenced only from XAML can be removed unless explicitly preserved. To ensure your bindings work in Release, reference your value converter from XAML and preserve your ViewModel, business model, and converter types. This prevents the linker from removing properties that your tooltip or data label templates access through Item.
17+
18+
{% tabs %}
19+
20+
{% highlight xaml %}
21+
22+
<chart:SfCartesianChart>
23+
<chart:SfCartesianChart.Resources>
24+
<local:ValueConverter x:Key="valueConverter" />
25+
26+
<DataTemplate x:Key="tooltiptemplate">
27+
<StackLayout x:DataType="chart:TooltipInfo" Orientation="Vertical">
28+
<Label Text="{Binding Item, Converter={StaticResource valueConverter},
29+
ConverterParameter=Planned,
30+
StringFormat='Planned : {0}h'}"
31+
TextColor="White" />
32+
</StackLayout>
33+
</DataTemplate>
34+
35+
<DataTemplate x:Key="labelTemplate">
36+
<StackLayout x:DataType="chart:ChartDataLabel" Orientation="Vertical">
37+
<Label Text="{Binding Item, Converter={StaticResource valueConverter},
38+
ConverterParameter=Planned,
39+
StringFormat='Label : {0}h'}"
40+
TextColor="Black" />
41+
</StackLayout>
42+
</DataTemplate>
43+
</chart:SfCartesianChart.Resources>
44+
45+
<chart:SplineAreaSeries x:Name="series"
46+
ItemsSource="{Binding ChartData}"
47+
XBindingPath="WeekNumber"
48+
YBindingPath="Planned"
49+
EnableTooltip="True"
50+
ShowDataLabels="True"
51+
LabelTemplate="{StaticResource labelTemplate}"
52+
TooltipTemplate="{StaticResource tooltiptemplate}">
53+
</chart:SplineAreaSeries>
54+
55+
</chart:SfCartesianChart>
56+
57+
{% endhighlight %}
58+
59+
60+
{% highlight C# %}
61+
62+
public class ValueConverter : IValueConverter
63+
{
64+
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
65+
{
66+
return value is WeekPlan weekPlan ? weekPlan.Planned : value;
67+
}
68+
69+
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => value;
70+
}
71+
72+
{% endhighlight %}
73+
74+
{% endtabs %}
75+
76+
## See also
77+
78+
[Why Tooltip and DataLabel Are Missing in Release Mode .NET MAUI Chart?](https://support.syncfusion.com/kb/article/21677/why-tooltip-and-datalabel-are-not-showing-in-release-mode-in-net-maui-sfcartesianchart)

0 commit comments

Comments
 (0)