예제 #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);
            }
예제 #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);
        }