My data looks something like this:
{ “key”: “123”, “category”: “x”, values: { v1: 1, v2: 2 }, items=[{name:1},{name:2}] }
I’m using an itemArray, and in a textblock within one of the items, I am trying to use a binding with a converter and a backconverter.
Long story short, I need a reference to the node (or graphobject) from within the backconverter but it appears there is no way to do that – I would have expected it to be passed in, just like in the converter.
I’m binding TextBlock.text value and the converter gets called with:
myconverter(dataitem, graphobject)
This works perfectly, as I can calculate programmatically how I want the text to appear.
However, after editing the backconverter comes in with: (newtextvalue, dataitem).
The problem is, I do not want to change the dataitem. It is actually a shared “definition” object.
I want to add the new value to the “values” object up in .part.data.values
Is there a simple fix – a way to get the current graphobject from within the backconverter?