Hi All, I have a datatemplate defined in a xaml file and i wana access it via c# code. Can anyone please tell me how can i access it? I added a new ResourceDictionary file and it's name is Dictionary1.xaml there I have a data template like
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DataTemplate x:Key="mytemplate">
<TextBlock Text="Name:" Background="Blue"/>
</DataTemplate>
</ResourceDictionary>
not i have a listbox called listBox1 and i wana assign it to it's Itemtemplate property but i m not getting how can i do it?