Closed Bodden007 closed 3 months ago
I don't speak Russian, but it seems that your XAML is not able to find the ViewModel, ensure your namespace is correct, I will close this for now.
I will move this to a discussion since this is not an issue with the library, maybe you can find help there!
I did everything as written https://livecharts.dev/docs/WPF/2.0.0-rc2/samples.lines.basic `using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes;
namespace WpfSample { ///
/// Interaction logic for MainWindow.xaml
///
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}
<Window x:Class="WpfSample.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:WpfSample" xmlns:lvc="clr-namespace:LiveChartsCore.SkiaSharpView.WPF;assembly=LiveChartsCore.SkiaSharpView.WPF">
namespace WpfSample { public partial class View:UserControl { public View() { InitializeComponent(); } } }
using LiveChartsCore.SkiaSharpView; using LiveChartsCore; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using CommunityToolkit.Mvvm.ComponentModel; using LiveChartsCore.SkiaSharpView.Painting; using SkiaSharp; using LiveChartsCore.SkiaSharpView.VisualElements;
namespace WpfSample { public class ViewModel : ObservableObject { public ISeries[] Series { get; set; } = { new LineSeries
{
Values = new double[] { 2, 1, 3, 5, 3, 4, 6 },
Fill = null
}
};
} `
What is missing, why is it not working? Why is there no normal explanation?