3
<Grid>
<ItemsControl ItemsSource="{Binding ScreenViewModelCollection}">
<ItemsControl.Resources>
<DataTemplate x:Key="SomeKey" TargetType="{x:Type local:RedScreenObject}">
<local:RedScreenObject/>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl>
</Grid>
我不知道爲什麼它看不到TargetType屬性。應該在Resources還是ItemTemplate下?我試過它都沒有找到它。在DataTemplate上找不到TargetType屬性
編輯: http://chat.stackoverflow.com/transcript/message/4295316#4295316
TargetType是