I need to reuse an existing data template, defined as a reource, in a data template defined in a control
...this is my customer data template as a resource so it can be a reusable object
Customer DataTemplate:
<ResourceDictionary ... >
<DataTemplate DataType="{x:Type Model:Customer}">
<StackPanel Orientation="Vertical" Width="Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="140" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="20"/>
<RowDefinition Height="25"/>
</Grid.RowDefinitions>
<TextBox Text="{Binding CustomerName}"
Grid.Column="0" Grid.Row="0" />
</StackPanel>
</DataTemplate>
</ResourceDictionary>
now I need to reuse the Customer data template defined above in a user control data template
<UserControl x:Class="MyCustomerControl"
<UserControl.Resources >
<DataTemplate DataType="{x:Type frnri:CustomerViewModel}">
question: How can I reuse customer data template here?
</DataTemplate>
</UserControl.Resources>
</UserControl>
Is possibile this scenario WITHOUT defined the customer data template inline in the MyCustomerControl?