Back to Livecharts2

About docs in this repository

docs/readme.md

2.1.0-dev-3654.2 KB
Original Source

About docs in this repository

The docs in this repo use markdown and Scriban to preprocess the md files, there is a closed source tool that does the prerocessing, there is nothing special about the tool, it just uses Scriban on all the files in the docs folder. Scriban is a templating language similar to Liquid, and the tool just replaces the templates with the actual content.

Scriban will replace {{ variable }} with the actual value, or run a function {{ function_name params }} with the result of the function.

Available variables

VariableDescription
versionThe current version of LiveCharts2, e.g. 2.0.0-beta.1
platformThe current platform, e.g. wpf, winforms, avalonia, maui, uno
platforn_display_nameThe platform name but as shown in NuGet, (WPF, Blazor, Maui, Uno.WinUI, Avalonia, WinUI, Eto)
platform_samples_folderThe folder name for the current platform samples in the repo
view_extensionResolves the view file depending on the platform, e.g. "/View.xaml" for wpf, "/View.axaml" for avalonia or ".razor" for Blazor
view_codeResolves the view code depending on the platform, e.g. "View.xaml.cs" for wpf, "View.axaml.cs" for avalonia or ".razor" for Blazor
avaloniatrue if the current platform is Avalonia, false otherwise
blazortrue if the current platform is Blazor, false otherwise
mauitrue if the current platform is .NET MAUI, false otherwise
winformstrue if the current platform is WinForms, false otherwise
wpftrue if the current platform is WPF, false otherwise
winuitrue if the current platform is WinUI, false otherwise
unotrue if the current platform is Uno, false otherwise
etotrue if the current platform is Eto.Forms, false otherwise
desktoptrue if the current platform is a desktop platform (WPF, WinForms, Avalonia, Uno, WinUI, Eto)
mobiletrue if the current platform is a mobile platform (Maui, Uno, Avalonia), false otherwise
mvvmtrue if the current sample uses MVVM, false otherwise
xamltrue if the current platform uses XAML (WPF, WinUI, WinForms, Avalonia, Uno), false otherwise
xaml2006true if the current platform uses XAML 2006 (WPF and WinUI), false otherwise
full_nameThe full name of the current sample, e.g. LiveChartsCore.SkiaSharpView.WPF.Samples.Axes.Basic
view_titleif xaml then "XAML", if blazor then "Razor" otherwise "Code behind"
viewThe code of the view file of the current sample

Available functions

FunctionDescription
render "path/to/file.md"Renders the content of the specified file.
render_current_directory_viewSimiar to render but uses the sample directory as parameter and gets the view file
render_current_directory_view_modelSimiar to render but uses the sample directory as parameter and gets the viewmodel