Exemplo n.º 1
0
        private static void UpdateIsShowing(DependencyObject element)
        {
            if (element == null)
            {
                return;
            }

            if (!Visible.IsVisible(element) ||
                !Loaded.IsLoaded(element))
            {
                element.SetIsShowing(false);
                return;
            }

            var isVisible = GetIsVisible(element);

            if (isVisible != null)
            {
                element.SetIsShowing(isVisible.Value);
                return;
            }

            var content = GetContent(element);

            element.SetIsShowing(content != null);
        }
Exemplo n.º 2
0
        private static void UpdateIsShowing(DependencyObject element)
        {
            if (element == null)
            {
                return;
            }

            if (!Visible.IsVisible(element) ||
                !Loaded.IsLoaded(element))
            {
                element.SetIsShowing(false);
                return;
            }

            var template  = GetTemplate(element);
            var isVisible = GetIsVisible(element);

            if (template != null && isVisible != null)
            {
                element.SetIsShowing(isVisible.Value);
                return;
            }

            element.SetIsShowing(template != null);
        }