Initially you can declare a Dictionary < string, object > Properties; in your class. On Runtime Add the property name as Key to the dictionary and the value of the property for the corresponding key. Bind your dictionary to the View using an IValueConverter. Inside the converter Convert Method write the code to obtain the value for the dynamic Property using the Key or index. whenever Property x1 or x2 is changed update the x3 value (x1 + x2) then raise property changed notification for both x1/x2 and the dictionary.
Ex:
private Dictionary< string,object > properties;
public Dictionary<string, object> Properties
{
get { return properties; }
set { properties = value; }
}
private int x1;
public int X1
{
get { return x1; }
set
{
x1 = value;
UpdateDictionaryValue(); // Updates the current X3 Value
OnPropertyChanged("X1");
OnPropertyChanged("Properties");
}
}
public void UpdateDictionaryValue()
{
if (Properties.ContainsKey("X3"))
{
Properties["X3"] = X1 + X2;
}
}
Let me know whether this helps.