Skip to content

Instantly share code, notes, and snippets.

@Polaringu
Created March 28, 2016 14:17
Show Gist options
  • Save Polaringu/3c61c8b49f2612fec26f to your computer and use it in GitHub Desktop.
Save Polaringu/3c61c8b49f2612fec26f to your computer and use it in GitHub Desktop.
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);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment