Skip to content

Running errors in minimalist examples —— "GLWpfControl" #2017

@347644445

Description

@347644445

Describe the bug
When I was using the livecharts2 library for development on WPF, I encountered an error:
FileLoadException: Could not load file or assembly 'GLWpfControl, Version=3.3.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Strong name signed assembly is required. (Exception from HRESULT: 0x80131044)
In order to eliminate multiple factors, I changed the example on your homepage, but this error still occurred. The example I used is as follows:
cs file:
namespace SAS
{
public partial class MainWindow : Window
{
public partial class ViewModel
{
public ChartData[] Data { get; set; } = new ChartData[]
{
new ChartData("Juana", new int[] { 2, 5, 4 }, "#f00"),
new ChartData("La cubana", new int[] { 5, 4, 1 }, "#00f")
};
}

    public class ChartData
    {
        public string Name { get; set; }
        public int[] Values { get; set; }
        public string Color { get; set; }

        public ChartData(string name, int[] points, string color)
        {
            Name = name;
            Values = points;
            Color = color;
        }
    }

    public MainWindow()
    {
        InitializeComponent();
    }
}

}

xaml files:
<lvc:CartesianChart Grid.Row="2" SeriesSource="{Binding Data}">
lvc:CartesianChart.SeriesTemplate

<lvc:XamlColumnSeries
SeriesName="{Binding Name}"
Values="{Binding Values}"/>

</lvc:CartesianChart.SeriesTemplate>
</lvc:CartesianChart>

To Reproduce
Steps to reproduce the behavior:

  1. Click on 'Run'
  2. See error

Expected behavior
I have only recently started developing WPF, and I have found many similar problems on the internet regarding this issue, but still cannot solve it. It would be appreciated If I could receive your answer.

Screenshots

Image

Desktop :

  • OS: Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions