Get/Set nested property values
- by Daniel Deer
I'll try to be more descriptive here.
A Few Q's:
using:
var foo = new Foo() { Bar = new Bar() { Value = "Value" } };
var value = DataBinder.Eval(foo, "Bar.Value");
Or: This one
It is possible to retrieve an internal nested property using property path syntax. Is there a way to set/trigger a nested property (a regular property not DependencyProperty) easily with some kind of simple mechanisms as described here?
I want to acheive something like:
string newValue = "Hello World!";
DataBinder.EvalSet(foo, "Bar.Value", NewValue);
Is there any mechanism that support both property path (for nested objects) and XPATHs (if the objects are XPATH navigable of course) ?
again, that supports get and set options.
Thanks,
DD