<Button Content="Save" Width="100" Height="50" Click="Button_Click"/> |
private async void Button_Click(object sender, RoutedEventArgs e)
{
Syncfusion.SfSkinManager.SfSkinManager.SetVisualStyle(chart, Syncfusion.SfSkinManager.VisualStyles.Office2016White);
await Task.Delay(50);
chart.Save("a.png");
Syncfusion.SfSkinManager.SfSkinManager.SetVisualStyle(chart, Syncfusion.SfSkinManager.VisualStyles.Blend);
} |
Brush background;
Brush areabackground;
private async void Button_Click(object sender, RoutedEventArgs e)
{
background = chart.Background;
areabackground = chart.AreaBackground;
chart.Background = new SolidColorBrush(Colors.White);
chart.AreaBackground = new SolidColorBrush(Colors.White);
await Task.Delay(50);
chart.Save("a.png");
chart.Background = background;
chart.AreaBackground = areabackground;
} |
Thank you for your help.
I tried the same your method but without using the trick of recalling the Task.Delay and it didn't work.
Recalling this method in an asyncronous way now it works!
Thank you.
Silvio Scattaglia