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

1
0

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"                                   
                       Name="DoseChart"
                       s3d:DirectXHelper.TryApplyDirectXRenderer="True"
                       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:SciChartSurface.XAxis>
            <s:NumericAxis AxisTitle="Distance (cm)"
                           FontFamily="Arial" FontSize="12"
                               FlipCoordinates="False"
                               GrowBy="0.05, 0.05"
                               ScientificNotation="None" 
                               s:CursorModifier.AxisLabelContainerStyle="{StaticResource CursorModAxisLabelStyle}"
                               s:CursorModifier.AxisLabelTemplate="{StaticResource CursorModAxisLabelTemplate}"
                               Style="{DynamicResource ResourceKey=DistanceAxisStyle}" />
        </s:SciChartSurface.XAxis>

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

        <!-- Modifiers (zoom, panning, tooltips, cursor) -->
        <s:SciChartSurface.ChartModifier>
            <s:ModifierGroup>
                <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" />
            </s:ModifierGroup>
        </s:SciChartSurface.ChartModifier>

    </s:SciChartSurface>
Version
5.2.2.11833
  • You must to post comments
0
0

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}">
    <Style.Triggers>
        <Trigger Property="ComponentModel:DesignerProperties.IsInDesignMode"
                 Value="False">
            <!-- Only apply TryApplyDirectXRenderer=true when Not in designer -->
            <Setter Property="s3D:DirectXHelper.TryApplyDirectXRenderer" Value="True" />
        </Trigger>
    </Style.Triggers>
</Style>

Best regards,
Andrew

  • 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: https://stackoverflow.com/a/32874861/303612
  • 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.