beto-rodriguez / LiveCharts2

Simple, flexible, interactive & powerful charts, maps and gauges for .Net, LiveCharts2 can now practically run everywhere Maui, Uno Platform, Blazor-wasm, WPF, WinForms, Xamarin, Avalonia, WinUI, UWP.

Home Page:https://livecharts.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FontFamily="{StaticResource myFont}" not work

mehdininja opened this issue · comments

Setting the font does not work in this way,

<Grid>
    <lvc:CartesianChart Series="{Binding Series}" XAxes="{Binding XAxes}" YAxes="{Binding YAxes}" VisualElements="{Binding VisualElements}" TooltipPosition="Hidden" FontFamily="{StaticResource myFont}" FontWeight="Bold" Typography.StylisticSet4="True"/>
</Grid>

also in the C# code FontFamily is string property.

LabelsPaint = new SolidColorPaint(SKColors.Black) {FontFamily="", SKFontStyle = new SKFontStyle(SKFontStyleWeight.Bold, SKFontStyleWidth.Normal, SKFontStyleSlant.Upright)},

So how to apply FontFamily="{StaticResource myFont}" ?