Exemple #1
0
        static ListView FindListView(DecompileTabState tabState)
        {
            var o = tabState.TabItem.Content as DependencyObject;

            while (o != null)
            {
                var lv = o as ListView;
                if (lv != null && InitDataTemplateAP.GetInitialize(lv))
                {
                    return(lv);
                }
                var children = UIUtils.GetChildren(o).ToArray();
                if (children.Length != 1)
                {
                    return(null);
                }
                o = children[0];
            }

            return(null);
        }
Exemple #2
0
        static ListView FindListView(IDocumentTab tab)
        {
            var o = tab.UIContext.UIObject as DependencyObject;

            while (o != null)
            {
                var lv = o as ListView;
                if (lv != null && InitDataTemplateAP.GetInitialize(lv))
                {
                    return(lv);
                }
                var children = UIUtils.GetChildren(o).ToArray();
                if (children.Length != 1)
                {
                    return(null);
                }
                o = children[0];
            }

            return(null);
        }