にポイントを動的に追加しようとしてLineSeries
いますが、プロットを無効にした後に表示されません。NuGet から直接、最新の OxyPlot バージョン 2014.1.301.1 を使用します。を新しいリストに設定するItemSource
と機能しますが、Items プロパティを編集しても何も起こりません。
XAML:
<Window x:Class="SparrowTesting.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sparrow="http://sparrowtoolkit.codeplex.com/wpf"
xmlns:oxy="http://oxyplot.codeplex.com"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<oxy:Plot Title="OxyTest" x:Name="chart">
<oxy:Plot.Series>
<oxy:LineSeries></oxy:LineSeries>
</oxy:Plot.Series>
</oxy:Plot>
<Button Grid.Row="1" x:Name="button1" Click="button1_Click">
<TextBlock>GO</TextBlock>
</Button>
</Grid>
</Window>
コード:
chart.Series[0].Items.Add(new DataPoint(1, 2));
chart.InvalidatePlot(true);//Does nothing