Exemplo n.º 1
0
            private static IElementFactory GetKeyDirectiveFactory(XamlElement element, Type keyType)
            {
                XamlMember keyDirective = element.Directives.FirstOrDefault(directive => directive.Name == XamlLanguage.KeyDirective);

                return(keyDirective != null?ElementFactory.FromValue(keyDirective.GetSingleValue(), keyType, element.Namespaces) : null);
            }
Exemplo n.º 2
0
        private static string GetNameDirectiveValue(XamlElement element)
        {
            XamlMember nameDirective = element.Directives.FirstOrDefault(directive => directive.Name == XamlLanguage.NameDirective);

            return(nameDirective != null ? (string)nameDirective.GetSingleValue() : null);
        }