Наследование: System.Windows.Controls.UserControl
Пример #1
0
 public int IndexOf(BreadcrumbControl control)
 {
     if (LayoutRoot.Children.Contains(control))
     {
         return(LayoutRoot.Children.IndexOf(control));
     }
     return(-1);
 }
 public int IndexOf(BreadcrumbControl control)
 {
     if (LayoutRoot.Children.Contains(control))
     {
         return LayoutRoot.Children.IndexOf(control);
     }
     return -1;
 }
Пример #3
0
        public void RemoveTo(BreadcrumbControl item)
        {
            var index = Breadcrumbs.IndexOf(item);

            while (Breadcrumbs.Count > index + 1)
            {
                Breadcrumbs.RemoveAt(index + 1);
            }
        }
Пример #4
0
        private void RemoveParentOf(BreadcrumbControl breadcrumb)
        {
            var index = Breadcrumbs.IndexOf(breadcrumb);

            if (index > 0)
            {
                Breadcrumbs.RemoveAt(index - 1);
            }
        }
Пример #5
0
        private int GetInsertPosition(BreadcrumbControl breadcrumb)
        {
            var index = Breadcrumbs.IndexOf(breadcrumb);

            if (index < 0)
            {
                index = 0;
            }
            return(index);
        }
Пример #6
0
        private BreadcrumbControl CreateBreadcrumb(IBreadcrumbItem item)
        {
            var control = new BreadcrumbControl {
                DataContext = item
            };

            control.BreadcrumbChanged += OnBreadcrumbChanged;
            control.BreadcrumbClicked += OnBreadcrumbClicked;
            control.PropertiesClicked += OnPropertiesClicked;
            return(control);
        }
        public void Add(BreadcrumbControl control)
        {
            if (BreadcrumbControls.Contains(control))
            {
                return;
            }

            foreach (var breadcrumb in BreadcrumbControls)
            {
                breadcrumb.BreadcrumbData.HasVisibleProperties = false;
            }
            LayoutRoot.Children.Add(control);
        }
Пример #8
0
        public void Add(BreadcrumbControl control)
        {
            if (BreadcrumbControls.Contains(control))
            {
                return;
            }

            foreach (var breadcrumb in BreadcrumbControls)
            {
                breadcrumb.BreadcrumbData.HasVisibleProperties = false;
            }
            LayoutRoot.Children.Add(control);
        }
Пример #9
0
        public void RemoveTo(BreadcrumbControl item)
        {
            var index = Breadcrumbs.IndexOf(item);

            while (Breadcrumbs.Count > index + 1)
            {
                Breadcrumbs.RemoveAt(index + 1);
            }
        }
Пример #10
0
 private int GetInsertPosition(BreadcrumbControl breadcrumb)
 {
     var index = Breadcrumbs.IndexOf(breadcrumb);
     if (index < 0)
     {
         index = 0;
     }
     return index;
 }
Пример #11
0
 private BreadcrumbControl CreateBreadcrumb(IBreadcrumbItem item)
 {
     var control = new BreadcrumbControl {DataContext = item};
     control.BreadcrumbChanged += OnBreadcrumbChanged;
     control.BreadcrumbClicked += OnBreadcrumbClicked;
     control.PropertiesClicked += OnPropertiesClicked;
     return control;
 }
Пример #12
0
 private void RemoveParentOf(BreadcrumbControl breadcrumb)
 {
     var index = Breadcrumbs.IndexOf(breadcrumb);
     if (index > 0)
     {
         Breadcrumbs.RemoveAt(index -1);
     }
 }
Пример #13
0
 public void Refresh(BreadcrumbControl control = null)
 {
     if (control == null)
     {
         control = Breadcrumbs.CurrentBreadcrumbControl;
     }
     if (control != null)
     {
         SuperGraph.ClearMapObjects(false);
         ShowLoading();
         _superGraphController.ChangeContextAsync(control.BreadcrumbData.Node);
     }
 }