Neuerstellung

- Quelle: https://github.com/oxyplot/oxyplot
This commit is contained in:
2023-09-02 09:24:59 +02:00
commit 9520c1fa4a
810 changed files with 117869 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
using OxyPlot;
namespace PlotModelAlreadyInUse
{
public class Item
{
public Item(string name)
{
this.Name = name;
this.Model = new PlotModel();
}
public string Name { get; set; }
public PlotModel Model { get; set; }
}
}

View File

@@ -0,0 +1,28 @@
<Window x:Class="PlotModelAlreadyInUse.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:PlotModelAlreadyInUse"
xmlns:oxy="http://oxyplot.org/wpf"
mc:Ignorable="d"
Title="PlotModel already in use" Height="350" Width="525">
<Window.DataContext>
<local:ViewModel/>
</Window.DataContext>
<Grid>
<DataGrid ItemsSource="{Binding Items}" AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Name" Binding="{Binding Name}"/>
</DataGrid.Columns>
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<oxy:PlotView Model="{Binding Model}" Height="200"/>
</DataTemplate>
</DataGrid.RowDetailsTemplate>
</DataGrid>
</Grid>
</Window>

View File

@@ -0,0 +1,16 @@
using System.Windows;
namespace PlotModelAlreadyInUse
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
[WpfExamples.Example("PlotModel already in use")]
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,17 @@
using System.Collections.ObjectModel;
namespace PlotModelAlreadyInUse
{
public class ViewModel
{
public ViewModel()
{
Items = new ObservableCollection<Item>();
for (var i = 0; i < 10; i++)
Items.Add(new Item("MyName " + i));
}
public ObservableCollection<Item> Items { get; set; }
}
}