Questions

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)

We are not sure why the DLL file sharpdx_direct3d11_1_effects_x86.dll is not pickled up by the Visual Studio designer, no matter what we try we cannot get it to work either. So we have this workaround.

Your solution presents me with another problem. First, my style is defined as an application resource, which should be fine, but my App.xaml doesn’t recognize the ‘componentModel:DesignerProperties.IsInDesignMode’ property. Next I decided to try to remove that problem from the equation by adding the style directly to the chart as you’ve provided here in your example. I still have the same problem. :( I get “DesignerProperties is not supported in a Windows Presentation Foundation (WPF) project”, and “The namespace prefix ‘componentModel’ is not defined”. Any ideas?

okay, it looks like this works as long as you remove the 2 lines that were directly entered in the SciChart declaration in XAML. In other words, the TryApplyDirectXRenderer and FallBackType must be declared in the surface style and excluded specifically in the chart header in XAML for the chart itself.

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.

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.