Say I've built a component as follows:
<ContentView x:Class="MyView">
<ContentView.Content>
<Grid >
and a few others similar....
I'd like to define a page with some dynamic content in a stack layout
<ContentPage>
<ContentPage.Content>
<StackLayout>
<ContentView Content= "{Binding TestNavVM.CurrentView}"/>
and then in VM code....
public View CurrentView
{
get{return view;}
set{view = value;OnPropertyChanged();}
}
...
and
CurrentView = new MyView();
Of course, it doesn't work, but as this question here suggests it's possible.
So - what am I doing wrong?