Hi all
I'm trying to get a DatatTemplate from a ResourceDictionary in code. The problem is when I'm trying to save it to string I get all the Binding location to be either empty or null.
Here is my piece of code
ResourceDictionary dictionary = new ResourceDictionary();
dictionary.Source = new Uri("WpfApplication1;component/Dict.xaml", UriKind.RelativeOrAbsolute);
DataTemplate template = (DataTemplate) dictionary["helloTextBox"];
string save = XamlWriter.Save(template.LoadContent());
I'd be happy for any insight.
Thanks