private void Item_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            MenuItem item = sender as MenuItem;

            switch (item.Header.ToString())
            {
            case "关闭":
                currentRadPane = RadPaneGroup.EnumeratePanes().Where(p => !p.IsHidden && p.IsSelected).FirstOrDefault();
                RadPaneGroup.RemovePane(currentRadPane);
                break;

            case "除此之外全部关闭":
                currentRadPane = RadPaneGroup.EnumeratePanes().Where(p => !p.IsHidden && p.IsSelected).FirstOrDefault();
                var panesToClose = RadPaneGroup.EnumeratePanes().Where(p => p != currentRadPane);
                for (int i = panesToClose.Count() - 1; i >= 0; i--)
                {
                    this.RadPaneGroup.RemovePane(panesToClose.ElementAt(i));
                }
                break;

            case "全部关闭":
                RadPaneGroup.Items.Clear();
                break;
            }
        }
 public void OpenDesignerView()
 {
     currentRadPane = RadPaneGroup.EnumeratePanes().Where(p => p.Name == "DesignApplication").FirstOrDefault();
     if (currentRadPane != null)
     {
         currentRadPane.IsHidden   = false;
         currentRadPane.IsSelected = true;
         currentRadPane.Content    = new DesignerView();
     }
     else
     {
         radPane = new RadPane()
         {
             Header = "应用程序设计",
             Name   = "DesignApplication",
             ContextMenuTemplate = null,
             ContextMenu         = PaneContextMenu,
             Content             = new DesignerView(),
             IsSelected          = true
         };
         RadPaneGroup.Items.Add(radPane);
     }
 }
        public void AddPane(string commandName)
        {
            currentRadPane = RadPaneGroup.EnumeratePanes().Where(p => p.Name == commandName).FirstOrDefault();

            if (currentRadPane != null)
            {
                currentRadPane.IsHidden   = false;
                currentRadPane.IsSelected = true;
                return;
            }
            else
            {
                switch (commandName)
                {
                case "AplicationManager":
                    radPane = new RadPane()
                    {
                        Header = "应用程序维护",
                        Name   = "AplicationManager",
                        ContextMenuTemplate = null,
                        ContextMenu         = PaneContextMenu,
                        Content             = new ApplicationManagerView(),
                        IsSelected          = true
                    };
                    RadPaneGroup.Items.Add(radPane);
                    break;

                case "AplicationModuleManager":
                    radPane = new RadPane()
                    {
                        Header = "应用程序模块维护",
                        Name   = "AplicationModuleManager",
                        ContextMenuTemplate = null,
                        ContextMenu         = PaneContextMenu,
                        Content             = new ApplicationModuleManagerView(),
                        IsSelected          = true
                    };
                    RadPaneGroup.Items.Add(radPane);
                    break;

                case "AplicationModuleRelation":
                    radPane = new RadPane()
                    {
                        Header = "应用程序模块关联",
                        Name   = "AplicationModuleRelation",
                        ContextMenuTemplate = null,
                        ContextMenu         = PaneContextMenu,
                        Content             = new ApplicationModuleRelationView(),
                        IsSelected          = true
                    };
                    RadPaneGroup.Items.Add(radPane);
                    break;

                case "NamespaceManager":
                    radPane = new RadPane()
                    {
                        Header = "命名空间维护",
                        Name   = "NamespaceManager",
                        ContextMenuTemplate = null,
                        ContextMenu         = PaneContextMenu,
                        Content             = new NameSpaceManagerView(),
                        IsSelected          = true
                    };
                    RadPaneGroup.Items.Add(radPane);
                    break;

                case "WorkflowDesinger":
                    radPane = new RadPane()
                    {
                        Header = "工作流设计",
                        Name   = "WorkflowDesinger",
                        ContextMenuTemplate = null,
                        ContextMenu         = PaneContextMenu,
                        Content             = new WorkflowDesignerView(),
                        IsSelected          = true
                    };
                    RadPaneGroup.Items.Add(radPane);
                    break;

                case "DesignApplication":
                    radPane = new RadPane()
                    {
                        Header = "应用程序设计",
                        Name   = "DesignApplication",
                        ContextMenuTemplate = null,
                        ContextMenu         = PaneContextMenu,
                        Content             = new DesignerView(),
                        IsSelected          = true
                    };
                    RadPaneGroup.Items.Add(radPane);
                    break;

                default:
                    break;
                }
            }
        }