Hi,
I am using WPF and I have Datatemplate that is i want to access into the codebihind how i can use this...\
Thanks..
Hi,
I am using WPF and I have Datatemplate that is i want to access into the codebihind how i can use this...\
Thanks..
<Window.Resources>
<DataTemplate x:Key="PersonDataTemplate">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Path=Name}" />
<TextBlock Text="{Binding Path=Age}" />
</StackPanel>
</DataTemplate>
</Window.Resources>
public Window1()
{
InitializeComponent();
DataTemplate dataTemplate = FindResource("PersonDataTemplate") as DataTemplate;
}