Esempio n. 1
0
        private static SceneNode GetHighestDataContextHost(SceneNode sceneNode)
        {
            SceneNode sceneNode1 = (SceneNode)null;

            for (SceneNode sceneNode2 = sceneNode; sceneNode2 != null && (!DocumentNodeHelper.IsStyleOrTemplate(sceneNode2.Type) && !PlatformTypes.DictionaryEntry.IsAssignableFrom((ITypeId)sceneNode2.Type)); sceneNode2 = sceneNode2.Parent)
            {
                if (DataContextHelper.HasDataContextProperty(sceneNode2.Type) && (sceneNode1 == null || sceneNode2.Parent != null))
                {
                    sceneNode1 = sceneNode2;
                }
            }
            return(sceneNode1);
        }
Esempio n. 2
0
 public static bool IsStyleOrTemplate(IType type)
 {
     return(DocumentNodeHelper.IsStyleOrTemplate(type));
 }