Making convention bindings work on a nested view in WP7

Topics: Conventions
Jun 12, 2011 at 7:57 AM

The following works perfectly in WPF (convention bindings correctly bind nested view elements to nested viewmodel properties):

    public class ShellViewModel : IShell
        private NestedViewModel _nested = new NestedViewModel();
        public NestedViewModel Nested
            get { return _nested; }


	<Grid Background="White">
            cal:View.Model="{Binding Nested}"/>

But the same code does not produce correct bindings on WP7. Am I trying to do something that is not recommended or is this a bug?

Jun 12, 2011 at 12:00 PM

Does it work in Silverlight 4? If so, it's probably a limitation of WP7.

Jun 12, 2011 at 8:02 PM

Yes, I have just double checked. Works in SL4, does not in WP7. Well, it is not a big deal - and probably would be working again in Mango.