public NavigationGroup GetNavigationGroup()
        {
            NavigationGroup navGroup = null;
            var             root     = this.GetRootComponent();

            if (root != null)
            {
                navGroup = root.navigationGroup;
                while (root != null && navGroup.IsActive() == false)
                {
                    root = root.GetRootComponent();
                    if (root != null)
                    {
                        navGroup = root.navigationGroup;
                    }
                }
            }

            if (root == null || navGroup.IsActive() == false)
            {
                var window = this.GetWindow();
                if (window != null)
                {
                    return(window.navigationGroup);
                }
                else
                {
                    return(null);
                }
            }
            else
            {
                return(navGroup);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Raises the validate editor event.
 /// You can override this method but call it's base.
 /// </summary>
 public virtual void OnValidateEditor()
 {
     if (this.navigationGroup == null)
     {
         this.navigationGroup = new NavigationGroup();
     }
     this.navigationGroup.OnValidate();
 }