I found that you can simply set d:DataContext on the root element inside the DataTemplate .
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" <ListBox ItemsSource="{Binding People}"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel d:DataContext="{d:DesignInstance Type=local:Person}"> <TextBlock Text="{Binding Name}" /> <TextBlock Text="{Binding Age}" /> <TextBlock Text="{Binding Height}" /> </StackPanel> </DataTemplate> </ListBox.ItemTemplate>
source share