Это может быть глупый вопрос, но можно ли определить некоторые образцы данных как DataContext, чтобы увидеть мой DataTemplate в DesignView?
В настоящий момент мне всегда нужно запускать мое приложение, чтобы узнать, работают ли мои изменения.
например. со следующим кодом DesignView просто показывает пустой список:
<ListBox x:Name="standardLayoutListBox" ItemsSource="{Binding myListboxItems}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Label Grid.Column="0" Content="{Binding text1}" />
<Label Grid.Column="1" Content="{Binding text2}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>