Jump to: navigation, search

Changes


HowTo:Convert Xamarin XAMLs to Maui

2,261 bytes added, 6 October
/* Mandatory */
For classes referenced in the XAML code, please don't forget to also replace "CPL" with "MAUI" in the class namespace.
[[Category:How-To|Convert Xamarin XAMLs to Maui]][[Category:Mobile|Convert Xamarin XAMLs to Maui]][[Category:XAML|Convert Xamarin XAMLs to Maui]]
=== Syncfusion control updates ===
| <x:String x:Key="TextFontFamily">Inter</x:String>
|}
 
=== Chart control updates ===
{{UnderConstructionStart}}
 
Namespaces, Title, Legend, and the Zoom & Pan behavior syntax of the Chart control changed. Further, some SyncFusion Chart components & Properties have changed. For more information and examples, please refer to the [https://help.syncfusion.com/maui/cartesian-charts/overview Syncfusion Maui Charts documentation].
{| class="wikitable"
! Xamarin
! MAUI
|-
| <syntaxhighlight lang="xml">
xmlns:chart="clr-namespace:Syncfusion.SfChart.XForms;assembly=Syncfusion.SfChart.XForms"
xmlns:controls="clr-namespace:UBIK.CPL.Controls;assembly=UBIK.CPL"
 
<chart:SfChart.Title>
<chart:ChartTitle Text="{Binding Header}" />
</chart:SfChart.Title>
<chart:SfChart.Legend>
<chart:ChartLegend />
</chart:SfChart.Legend>
<chart:SfChart.ChartBehaviors>
<chart:ChartZoomPanBehavior />
</chart:SfChart.ChartBehaviors>
 
<chart:NumericalStripLine
Width="2"
StrokeColor="{Binding Color, Converter={StaticResource IntToColor}}"
IsPixelWidth="True"
StrokeWidth="5"
Start="{Binding Value}" />
 
<chart:FastLineSeries
ItemsSource="{Binding Items}"
Label="{Binding Name}"
Color="{Binding Color, Converter={StaticResource IntToColor}}"
XBindingPath="XValue"
YBindingPath="YValue">
</syntaxhighlight>
| <syntaxhighlight lang="xml">
xmlns:chart="clr-namespace:Syncfusion.Maui.Toolkit.Charts;assembly=Syncfusion.Maui.Toolkit"
xmlns:controls="clr-namespace:UBIK.MAUI.Controls;assembly=UBIK.MAUI"
 
<controls:SfChartExt.Title>
<Label Text="{Binding Header}" HorizontalOptions="Center" />
</controls:SfChartExt.Title>
<controls:SfChartExt.Legend>
<chart:ChartLegend />
</controls:SfChartExt.Legend>
<controls:SfChartExt.ZoomPanBehavior>
<chart:ChartZoomPanBehavior />
</controls:SfChartExt.ZoomPanBehavior>
 
<chart:NumericalPlotBand
Stroke="{Binding Color, Converter={StaticResource IntToColor}}"
StrokeWidth="5"
Start="{Binding Value}"
End="{Binding Value}" />
 
<chart:FastLineSeries
ItemsSource="{Binding Items}"
Label="{Binding Name}"
Fill="{Binding Color, Converter={StaticResource IntToColor}}"
XBindingPath="XValue"
YBindingPath="YValue" />
</syntaxhighlight>
|}
 
{{UnderConstructionEnd}}
 
[[Category:How-To|Convert Xamarin XAMLs to Maui]]
[[Category:Mobile|Convert Xamarin XAMLs to Maui]]
[[Category:XAML|Convert Xamarin XAMLs to Maui]]
== SfTabView ==
654
edits