Created
March 14, 2013 13:05
-
-
Save BartDM/5161138 to your computer and use it in GitHub Desktop.
Code samples of blog post Creating graphs in WPF using OxyPlot on http://blog.bartdemeyer.be
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel; | |
using OxyPlot; | |
using OxyPlotDemo.Annotations; | |
namespace OxyPlotDemo.ViewModels | |
{ | |
public class MainWindowModel: INotifyPropertyChanged | |
{ | |
private PlotModel plotModel; | |
public PlotModel PlotModel | |
{ | |
get { return plotModel; } | |
set { plotModel = value; OnPropertyChanged("PlotModel"); } | |
} | |
public MainWindowModel() | |
{ | |
PlotModel = new PlotModel(); | |
} | |
public event PropertyChangedEventHandler PropertyChanged; | |
[NotifyPropertyChangedInvocator] | |
protected virtual void OnPropertyChanged(string propertyName) | |
{ | |
PropertyChangedEventHandler handler = PropertyChanged; | |
if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment