I'm using LightningChart 10.3.2.2 with non-bindable WPF and I got an issue on remote desktop connection, but I'm not sure what is wrong, so I will explain my scenario:
I have a polar chart that acts like a speedometer: Have one AnnotationPolar that looks like a needle, and one AxisPolar (not the default axis) for this needle. So when I need to update needle angle, I simply change the AxisPolar's AngleOrigin property instead of changing AnnotationPolar's RotateAngle or AxisValues (location/target).
The simplified code looks like this:
Code: Select all
public partial class SpeedometerChart : UserControl
{
private readonly LightningChart chart;
private AxisPolar needleAxis;
private AnnotationPolar needle;
public SpeedometerChart()
{
chart = new LightningChart();
InitializeNeedleAndAxis();
Content = chart;
}
private void InitializeNeedleAndAxis()
{
needleAxis = new AxisPolar(chart.ViewPolar);
... // Set other properties
needleAxis.Visible = false;
chart.ViewPolar.Axes.Add(needleAxis);
needle = new AnnotationPolar(chart.ViewPolar, needleAxis);
... // Set other properties
needle.LocationAxisValues.SetValues(0, 0);
needle.TargetAxisValues.Amplitude = needleAxis.MaxAmplitude;
chart.ViewPolar.Annotations.Add(needle);
}
public void SetNeedleAngle(double angle)
{
chart.BeginUpdate();
needleAxis.AngleOrigin = angle;
chart.EndUpdate();
}
}
I'm running this project on my computer directly and the chart runs and updates with no problem. But when I connected to my computer via Windows Remote Desktop Connection, the chart throws an exception rarely; with "Could not load file or assembly 'System.ComponentModel.Composition, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified". error.
The stacktrace shortly looks like this:
Code: Select all
...
at Arction.Wpf.Charting.LightningChart.HandleChartMessage(...)
at Arction.Wpf.Charting.LightningChart.DrawChartMain()
at Arction.Wpf.Charting.LightningChart.EndUpdateInternal(Boolean enableRepaint)
at SpeedometerChart<BeginUpdate>b__68_0()
at SpeedometerChart.SetNeedleAngle(double angle)
at SpeedometerChartViewModel.UpdateNeedle(double angle)
...
ExceptionInfo:
Code: Select all
MessageSeverity: Recoverable Error
MessageType: Unknown
Details: Could not load file or assembly 'System.ComponentModel.Composition, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
Chart: LightningChart .NET
Source: System.Private.CoreLib
Description: Unknown message type
Code: Select all
AvailableRam: 7415 MB
UsedRam: 1247.6719 MB
Gen0HeapSize: 0
Gen1HeapSize: 0
Gen2HeapSize: 0
FinalizationSurvivors: 0
OS: Microsoft Windows NT 10.0.19045.0
Is64bit: True
CultureInfo: en-US
NetFrameworkVersion: v4.0.30319
Code: Select all
CreatedCount: 1
AliveCount: 1
DisposedCount: 0
UndisposedCount: 0
Id: 0
LicenseStatus: 1
Version: 10.3.2.4002
NagText: (one time this field is empty, but another time I get "No valid license available." error)
LastErrorHandled: False
ThrowChartErrorsEnabled: False
DeploymentKeyChanged: False
DebuggerAttached: False
IsDPIAware: True
... // Other properties
RenderOptions:
RenderDevice:
Description: NVIDIA Quadro K620
RenderedDeviceType: DX11 Hardware
Render device created: Yes
Pure device: Yes
Memory on graphics card: 2006 MB
... // Other properties
ActiveObjects:
EngineInitResults:
Last Engine Init Results:
DeviceType: HardwareOnlyD11
Success: True
Warnings: None
Exceptions: None
... // Other properties
ChartScreenPosition:
ChartWidth: 638
ChartHeight: 370
ActiveView: ViewPolar
Thanks in advance.