Example #1
0
        private static void LoadOrFillChildTemplateFromXml(DataTemplate dataTemplate, XmlNode dataListNode)
        {
            var childName     = GetDataTemplateNameFromListNode(dataListNode);
            var childTemplate = dataTemplate.Children.SingleOrDefault(e => e.Name.Equals(childName));

            if (childTemplate != null)
            {
                FillTemplateFromXml(dataListNode, childTemplate);
            }
            else
            {
                dataTemplate.AddChild(LoadTemplateFromXml(dataListNode));
            }
        }
Example #2
0
 private static void LoadOrFillChildTemplateFromXml(DataTemplate dataTemplate, XmlNode dataListNode)
 {
     var childName = GetDataTemplateNameFromListNode(dataListNode);
     var childTemplate = dataTemplate.Children.SingleOrDefault(e => e.Name.Equals(childName));
     if (childTemplate != null)
         FillTemplateFromXml(dataListNode, childTemplate);
     else
         dataTemplate.AddChild(LoadTemplateFromXml(dataListNode));
 }