diff --git a/docs/overview/1.2.install.md b/docs/overview/1.2.install.md index bd9404038..552bd1ef6 100644 --- a/docs/overview/1.2.install.md +++ b/docs/overview/1.2.install.md @@ -694,7 +694,7 @@ Go to the `Solution Explorer` and browse for `Program.cs` file, then edit the it Go to the `Solution Explorer` and browse for `UnoApp.Shared/App.xaml.cs` file, then edit the it as follows. ``` -{{ render this "~/../samples/UnoPlatform_v5/UnoPlatform_v5/App.cs" }} +{{ render this "~/../samples/UnoPlatform_v5_2_175/UnoPlatform_v5_2_175/App.cs" }} ``` {{~ end ~}} diff --git a/samples/UnoPlatform_v5_2_175/UnoPlatform_v5_2_175/App.xaml.cs b/samples/UnoPlatform_v5_2_175/UnoPlatform_v5_2_175/App.xaml.cs index 411676aab..38d5d0000 100644 --- a/samples/UnoPlatform_v5_2_175/UnoPlatform_v5_2_175/App.xaml.cs +++ b/samples/UnoPlatform_v5_2_175/UnoPlatform_v5_2_175/App.xaml.cs @@ -1,3 +1,6 @@ +using LiveChartsCore; // mark +using LiveChartsCore.SkiaSharpView; // mark +using SkiaSharp; // mark using Uno.Resizetizer; namespace UnoPlatform_v5_2_175; @@ -14,9 +17,34 @@ public App() protected Window? MainWindow { get; private set; } protected IHost? Host { get; private set; } + public record City(string Name, double Population); protected async override void OnLaunched(LaunchActivatedEventArgs args) { + LiveCharts.Configure(config => + config + // you can override the theme + // .AddDarkTheme() + + // In case you need a non-Latin based font, you must register a typeface for SkiaSharp + //.HasGlobalSKTypeface(SKFontManager.Default.MatchCharacter('汉')) // <- Chinese + //.HasGlobalSKTypeface(SKFontManager.Default.MatchCharacter('あ')) // <- Japanese + //.HasGlobalSKTypeface(SKFontManager.Default.MatchCharacter('헬')) // <- Korean + //.HasGlobalSKTypeface(SKFontManager.Default.MatchCharacter('Ж')) // <- Russian + + //.HasGlobalSKTypeface(SKFontManager.Default.MatchCharacter('أ')) // <- Arabic + //.UseRightToLeftSettings() // Enables right to left tooltips + + // finally register your own mappers + // you can learn more about mappers at: + // https://livecharts.dev/docs/unowinui/2.0.0-rc2/Overview.Mappers + + // here we use the index as X, and the population as Y + .HasMap((city, index) => new(index, city.Population)) + // .HasMap( .... ) + // .HasMap( .... ) + ); + var builder = this.CreateBuilder(args) // Add navigation support for toolkit controls such as TabBar and NavigationView .UseToolkitNavigation()