를 찾을 수 없습니다 :
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DataTemplate x:Key="ContactImageTemplate">
<Border Padding="5" CornerRadius="15">
<Grid MaxHeight="150" HorizontalAlignment="Stretch">
...
</Grid>
</Border>
</DataTemplate>
</ResourceDictionary>
그런 다음 템플릿이 App.xaml이 방법
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Views/Controls/ContactImageTemplate.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
파일 참조
보기에서 템플릿을이 방법으로 참조하십시오.
<ListView x:Name="ContactsListView"
ItemTemplate="{StaticResource ContactImageTemplate}"
ItemsSource="{Binding Images}" /ListView>