XAML properties values overwritten by the PlotModel

Feb 3, 2014 at 11:52 AM
Hello,

I was wondering about something a bit annoying when using the PlotModel in a MVVM scenario.

As the library is now, the PlotModel values overwrites all properties values that are defined directly in the XAML. This means that, when using the PlotModel, no properties can be set in the XAML.

This is annoying, because it means that some UI stuff must be set in the VM (where the PlotModel is setup).

I'm currently defining my PlotModel in my VM because it's too complex to be defined in the XAML only (dynamic number of series mostly). Even though this is a necessity for me, I still would like to define some things from the XAML.

For example, I would like to set a specific font for the Title of the plot. This is typically a UI stuff that my VM should have no knowledge about. Unfortunately, if I set it up in my XAML, it is overwritten by the default value when the biding of the PlotModel kicks-in.

So, my question, would it be possible to, when using XAML and databinding, prioritize the value set in the XAML (if it has been re-defined) over the value in the PlotModel?

Hope this is clear enough.

Thanks,
Gimly
Coordinator
Feb 4, 2014 at 7:20 PM
Good idea, added to https://oxyplot.codeplex.com/workitem/10128
Should not be very difficult to implement, I think.