Example #1
0
        /*NOTES: RENDER DOCUMENTGROUP: WINDOWS_LOADED NOTWORK -> USED GRID_LOADED OF WINDOWS/GRID_LOADED USERCONTROL*/
        public void fRenderForm(string oMenuID, string oFormName, string oFormCaption)
        {
            try{
                if (MTGlobal.TAB_ARRAY == null)
                {
                    MTGlobal.TAB_ARRAY = new List <string>();
                }
                if (MTGlobal.TAB_ARRAY.Contains(oMenuID))
                {
                    return;
                }
                MTGlobal.TAB_ARRAY.Add(oMenuID);

                string        mFormPath = @"View\" + oFormName + ".xaml";
                DocumentPanel frmPanel  = null;
                frmPanel         = DLayOutMain.DockController.AddDocumentPanel(DocGrpMain, new Uri(mFormPath, UriKind.Relative));
                frmPanel.Name    = oMenuID;
                frmPanel.Caption = oFormCaption;
                DocumentPanel.SetMDISize(frmPanel, new Size(400, 300));
                DocumentPanel.SetMDILocation(frmPanel, new Point(200, 200));
                SetWindowActive(frmPanel);

                MTGlobal.MT_ACTIVE_MENUID  = oMenuID;
                MTGlobal.MT_ACTIVE_FORM    = oFormName;
                MTGlobal.MT_ACTIVE_CAPTION = oFormCaption;
            }
            catch { }
        }
Example #2
0
        private void btnAddDockPanel_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            panel1 = dockLayoutManager1.DockController.AddDocumentPanel(documentGroup1,
                                                                        new Uri(@"CustomWindows\UserControl1.xaml", UriKind.Relative));
            panel1.Caption = "Document " + (ctr++).ToString();

            DocumentPanel.SetMDISize(panel1, new Size(400, 300));
            DocumentPanel.SetMDILocation(panel1, new Point(200, 200));
            ActivateItem(panel1);
        }