Looking for the WPF equivalent of the following:
<controls:TabItem
Foreground="Black"
Header="{Binding Path=Home.Header}"
Content="{Binding **Path=Home**, Mode=OneWay}" />
Home is:
public ViewModelBase Home
{
get
{
return this._homeViewModel;
}
}
Inside my ViewModel, I am unable to bind the XAML to the _homeViewModel in Silverlight.
Any ideas ?
Silverlight still doesn’t support implicit DataTemplates 🙁
The best you can do is to use an attached behaviour to set the DataTemplate yourself (and have the behaviour get a DataTemplate with a key that is defined by convention).
Google “Attached Behaviour” if that was gobbledygook.