Forum rules DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
private void separateControlStylesToolStripMenuItem_Click(object sender, EventArgs e)
{
pdfCtl.Inst.LockCmdCustomizationEvent();
PDFXEdit.IUIX_Inst iuiInst = (PDFXEdit.IUIX_Inst)pdfCtl.Inst.GetExtension("UIX");
iuiInst.CmdManager.LockAllPanesUpdates();
PDFXEdit.IPXV_MainFrame firstMainFrame = pdfCtl.Inst.MainFrm[0];
firstMainFrame.View.CmdPaneTop.Hide();
firstMainFrame.View.CmdPaneLeft.Hide();
firstMainFrame.View.CmdPaneRight.Hide();
firstMainFrame.View.CmdPaneBottom.Hide();
PDFXEdit.IPXV_MainFrame secondMainFrame = pdfCtl.Inst.MainFrm[1];
secondMainFrame.View.CmdPaneTop.Show();
secondMainFrame.View.CmdPaneLeft.Show();
secondMainFrame.View.CmdPaneRight.Show();
secondMainFrame.View.CmdPaneBottom.Show();
iuiInst.CmdManager.UnlockAllPanesUpdates();
pdfCtl.Inst.UnlockCmdCustomizationEvent();
}
public void InitializeTwoControls()
{
//First frame will be with full Control functionality
PDFXEdit.IPXV_MainFrame firstMainFrame = pdfCtl.Inst.MainFrm[0];
PDFXEdit.IPXV_MainView firstMainView = firstMainFrame.View;
PDFXEdit.IPXC_Document doc = pxcInst.OpenDocumentFromFile("D:\\TestFile.pdf", null, null);
firstMainFrame.OpenDocFrom(doc);
firstMainView.CmdPaneTop.Show();
//Setting up preview frame
PDFXEdit.IPXV_MainFrame secondMainFrame = pdfCtl.Inst.MainFrm[1];
PDFXEdit.IPXV_MainView secondMainView = secondMainFrame.View;
PDFXEdit.ICab openParams = pdfCtl.Inst.CreateOpenDocParams();
PDFXEdit.ICabNode openParamsRoot = openParams.Root;
openParamsRoot.SetBool("NewDocView", true);
secondMainFrame.OpenDocFrom(doc, openParams);
//Setting layout style for no tab bar
PDFXEdit.IUIX_Layout layout = secondMainView.DocViewsArea.Panes.Layout;
if (layout.Root.Count > 0)
layout.Root[0].SetStyle((int)PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_HideOneTab | (int)PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_NoTabBar, (int)PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_HideOneTab | (int)PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_NoTabBar);
}
As for your second question - each of those can hold some child panes, command bars etc. For example - Pages View has a bottom control, the Documents View has properties pane on the right, attachments pane on the bottom and many other panes on the left.
Why can't you set the VisibleCmdPanes setting and then hide all of the needed command bars? This will do the same but with reverse logic. Also, you cannot mimic the VisibleCmdPanes directly, as it uses many of our inner code methods that are not accessible via the SDK.
VisibleCmdPanes is global. Once set it will change the appearance of all MainFrames.
Ok, just needed the confirmation that it cannot be done.
Every time I instantiate a new pxv_control (and set VisibleCmdPanes) I will iterate over all main frames and reset visibility of the needed ui elements.