<Grid>
<ItemsControl ItemsSource="{Binding ScreenViewModelCollection}">
<ItemsControl.Resources>
<DataTemplate x:Key="SomeKey" TargetType="{x:Type local:RedScreenObject}">
<local:RedScreenObject/>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl>
</Grid>
I have no idea why it can't see the TargetType property. Should be under Resources or ItemTemplate? I tried both it doesn't find it either way.
EDIT: In order to get blasted by more downvotes ha ha it was in reference to this: https://chat.stackoverflow.com/transcript/message/4295316#4295316
DataTemplate
only has a DataType
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With