SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0
0

If an app generates multiple SciChartSurfaces, what happens when VisualXcceleratorEngine is enabled on one of them? Do other surfaces switch to the VisualXcceleratorEngine or remain in the software mode?

Version
6.2.1
  • You must to post comments
0
0

Hi there,

No it’s a per-chart setting. The cleanest / easiest way to apply this to multiple charts is to use a WPF Style, e.g.

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:s="http://schemas.abtsoftware.co.uk/scichart">
  <Style TargetType="s:SciChartSurface" x:Key="SciChartSurfaceDefaultStyle">
    <Setter Property="s:VisualXcceleratorEngine.IsEnabled" Value="True"/>
    <Setter Property="s:VisualXcceleratorEngine.FallbackType" Value="{x:Type s:HighSpeedRenderSurface}" />
    <Setter Property="s:VisualXcceleratorEngine.DowngradeWithoutException" Value="True" />
    <Setter Property="s:VisualXcceleratorEngine.EnableImpossibleMode" Value="False" />
  </Style>
</ResourceDictionary>

Then apply the style to the SciChartSurface like this

<UserControl.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="Styles.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</UserControl.Resources>

<Grid>
    <s:SciChartSurface x:Name="sciChartSurface"
                       Style="{StaticResource SciChartSurfaceDefaultStyle}">

  ... 

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.