I have a problem with databinding in WPF, here's my exemplary class:

```
public class testClass
{
    public Size testInnerSize;

    public testClass()
    {
        testInnerSize = new Size(66, 99);
    }
}

```

I want to bind a TextBox in my form to the property of testInnerSize, let's say Width. So I'm setting the DataContext of this textbox to the testClass object and in XAML:

```
<TextBox Text="{Binding Path=testInnerSize.Width }" Name="textBox3" (...)

```

But it does not work, the textbox is empty instead of having value 66. On the other hand, when I set the DataContext to testObject.testInnerSize the value is displayed in a textbox, yet it is not updated in the object after text modification. 

So the question is: how can I two-way bind the Width property of a Size object that is a property of another object?

Full code used for testing:

```
public partial class testpage : Page
{
    public Size testSize;
    testClass testObject = new testClass();

    public testpage()
    {
        InitializeComponent();
        testSize = new Size(6, 9);
        textBox2.DataContext = testSize;
        textBox3.DataContext = testObject;
    }

    private void textChanged(object sender, TextChangedEventArgs e)
    {
        MessageBox.Show(testObject.testInnerSize.Width + " " + testObject.testInnerSize.Height, "", MessageBoxButton.OK);
    }
}

public class testClass
{
    public Size testInnerSize;

    public testClass()
    {
        testInnerSize = new Size(66, 99);
    }
}

```

XAML binding:

```
    <TextBox Text="{Binding Path=Width }" Name="textBox2" />
    <TextBox Text="{Binding Path=testInnerSize.Width }"  Name="textBox3" TextChanged="textChanged" />

```

**UPDATE 1**

Now I have checked and it does not depend on being a subobject of the testClass object - the testSize property is binded so its textbox displays a proper value, but the testSize.Width value is not being updated. To see it just add:

```
    private void text1Changed(object sender, TextChangedEventArgs e)
    {
        MessageBox.Show(testSize.Width + " " + testSize.Height, "", MessageBoxButton.OK);
    }

```

handler to a TextChanged event.