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


In the designer I’m seeing this. It doesn’t seem to affect the application; however, I can’t see any of my XAML in the designer because of this problem. Also, I’m having a strange intermittent issue with multiple instances of the chart in my UI not being as smooth and sharp after adding a few charts.

DllNotFoundException: Unable to load DLL ‘sharpdx_direct3d11_1_effects_x86.dll’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)

at SciChart.Drawing.DirectX.Context.D3D11.DirectXHelper.LTC.J(Object D, DXErrorEventArgs I)
at SciChart.Drawing.DirectX.Context.D3D11.Direct3D11RenderSurface.RecreateSurface()
at SciChart.Drawing.Common.RenderSurfaceBase.RenderSurfaceSizeChanged(Object sender, SizeChangedEventArgs sizeChangedEventArgs)
at System.Windows.SizeChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.FrameworkElement.OnRenderSizeChanged(SizeChangedInfo sizeInfo)
at System.Windows.ContextLayoutManager.fireSizeChangedEvents()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.UIElement.UpdateLayout()

Here’s the XAML for my chart

        <!-- Chart  -->
    <s:SciChartSurface Grid.Row="1" Grid.Column="1"                                   
                       s3d:DirectXHelper.FallbackType="{x:Type s:HighQualityRenderSurface}"
                       RenderableSeries="{s:SeriesBinding Measurements}"
                       Annotations="{s:AnnotationsBinding Annotations}"
                       Style="{StaticResource ResourceKey=SurfaceStyle}"                                                      
                       GridLinesPanelStyle="{StaticResource ResourceKey=GridLinesPanelStyle}">

        <!-- Distance Axis-->
            <s:NumericAxis AxisTitle="Distance (cm)"
                           FontFamily="Arial" FontSize="12"
                               GrowBy="0.05, 0.05"
                               s:CursorModifier.AxisLabelContainerStyle="{StaticResource CursorModAxisLabelStyle}"
                               s:CursorModifier.AxisLabelTemplate="{StaticResource CursorModAxisLabelTemplate}"
                               Style="{DynamicResource ResourceKey=DistanceAxisStyle}" />

        <!-- Dose Axis -->
            <s:NumericAxis AxisTitle="Dose (%)"
                               GrowBy="0.05, 0.05" 
                               Style="{DynamicResource ResourceKey=DoseAxisStyle}"
                               s:CursorModifier.AxisLabelContainerStyle="{StaticResource CursorModAxisLabelStyle}"
                               s:CursorModifier.AxisLabelTemplate="{StaticResource CursorModAxisLabelTemplate}" />

        <!-- Modifiers (zoom, panning, tooltips, cursor) -->
                <s:RubberBandXyZoomModifier IsAnimated="True" IsXAxisOnly="False" />
                <s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick" />
                <s:ZoomPanModifier ExecuteOn="MouseRightButton" />
                <s:MouseWheelZoomModifier ActionType="Zoom" XyDirection="XYDirection" />
                <s:XAxisDragModifier DragMode="Scale" />
                <s:YAxisDragModifier DragMode="Scale" />
                <s:TooltipModifier x:Name="ChartTooltip" IsEnabled="True" />
                <s:CursorModifier x:Name="ChartCursor" IsEnabled="False" ShowAxisLabels="True" Foreground="Red" />

  • You must to post comments

OK so silly question but have you included sharpdx_direct3d11_1_effects_x86.dll in your application with ‘Copy to output directory = Always’ as per our instructions here?

When including SharpDX from NuGet there is no need to include these libraries as they are automatically copied to output when the application is run.

However, if the designer fails to pick them up then it could be a problem with SharpDX or the Visual Studio Designer process itself. In which case we’d recommend simply including the libraries sharpdx_direct3d11_1_effects_x86.dll and sharpdx_direct3d11_1_effects_x64.dll manually in your project with ‘Copy to output = Always’

Update – Disable DirectX in design mode

This problem could also be resolved by only applying DirectX when not in design mode. Please see this StackOverflow question for how.

<Style TargetType="{x:Type s:SciChartSurface}">
        <Trigger Property="ComponentModel:DesignerProperties.IsInDesignMode"
            <!-- Only apply TryApplyDirectXRenderer=true when Not in designer -->
            <Setter Property="s3D:DirectXHelper.TryApplyDirectXRenderer" Value="True" />

Best regards,

  • Chris Kirkman
    Andrew. Yes, I’m using the NuGet package method to add references. And it does run fine and display the chart at runtime. It’s only at design time that I have this issue. Before adding the DirectX version of the SciChart the designer worked as well. This is only after adding the DirectX version that this happens. I have followed the method to add directly to my project (as per the video above) and have the same result.
  • Andrew
    I had another thought. Only enable DirectX when not at design time. How to do this:
  • Andrew
    If the libraries are included and copy-to-output, then its a visual studio designer issue, we can’t help. But the above method to include only when not design time will help.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.