Databinding to a property within an object in the DataContext in Silverlight
In my application I'm databinding to a ViewModel which is just a class with the properties I need, which gets set as the screens DataContext. This has worked fine for individual properties, but when I try and databind to a property within an object in my view model, no values are displayed.

Ie: for the view model

    public ViewModel {
        int someNumber { get { return 6; } }
        string someValue { get { return "Some Text"; } }
        SomeObject myObject = new SomeObject { anotherVal = "More text" };
    } 

Using Text="{Binding someNumber}" or Text="{Binding someValue}" works fine, but Text={Binding myObject.anotherVal}" doesnt. Anyone know what I'm doing wrong?

(myObject is set as an instantiated SomeObject btw, I just showed it like that to demonstrate the property I am after)
Databinding to a property within an object in the DataContext in Silverlight
===

In my application I'm databinding to a ViewModel which is just a class with the properties I need, which gets set as the screens DataContext. This has worked fine for individual properties, but when I try and databind to a property within an object in my view model, no values are displayed.

Ie: for the view model

    public ViewModel {
        int someNumber { get { return 6; } }
        string someValue { get { return "Some Text"; } }
        SomeObject myObject = new SomeObject { anotherVal = "More text" };
    } 

Using Text="{Binding someNumber}" or Text="{Binding someValue}" works fine, but Text={Binding myObject.anotherVal}" doesnt. Anyone know what I'm doing wrong?

(myObject is set as an instantiated SomeObject btw, I just showed it like that to demonstrate the property I am after)