Jump to content
Software FX Community

Chart won't refresh after OnPropertyChanged


faezridzal

Recommended Posts

Hi,

I'm using the MVVM pattern with the XAML binding as follows:

AxisX>

---

class ChartViewModel

{

private ObservableCollection _strategyList;

public ObservableCollection StrategyList {get{return _strategyList}}

public ChartViewModel() {

foreach (strategy in _strategyList) strategy.PropertyChanged += delegate {OnPropertyChanged("StrategyList")};

...

}

class StrategyViewModel

{

public string Name {get;set;}

public ObservableCollection Points

...

So the XAML will list down the first level collection as series and then plot the curve for each series. The problem is, when I make changes to Points, it doesn't get updated. Anyone can help?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...