private void ChangeDisplayType(PageRowDisplayType pageRowDisplayType) { UpdateAndReload(() => { // we need to remove the current innerPanel this.pnlMain.Children.Clear(); if (pageRowDisplayType == PageRowDisplayType.SinglePageRow) { this.innerPanel = new SinglePageMoonPdfPanel(this); this.innerPanel.OnZoomChanged += ZoomChanged; } else { this.innerPanel = new ContinuousMoonPdfPanel(this); this.innerPanel.OnZoomChanged += ZoomChanged; } this.pnlMain.Children.Add(this.innerPanel.Instance); }, this.ViewType); if (this.PageRowDisplayChanged != null) { this.PageRowDisplayChanged(this, EventArgs.Empty); } }
private void ChangeDisplayType(PageRowDisplayType pageRowDisplayType) { UpdateAndReload(() => { // we need to remove the current InnerPanel //this.pnlMain.Children.Clear(); if (InnerPanel != null) { InnerPanel.CurrentPageChangedHandler -= OnCurrentPageChanged; } if (pageRowDisplayType == PageRowDisplayType.SinglePageRow) { this.InnerPanel = new SinglePageMoonPdfPanel(this); } else { this.InnerPanel = new ContinuousMoonPdfPanel(this); } InnerPanel.CurrentPageChangedHandler += OnCurrentPageChanged; //this.pnlMain.Children.Add(this.InnerPanel.Instance); }, this.ViewType); if (this.PageRowDisplayChanged != null) { this.PageRowDisplayChanged(this, EventArgs.Empty); } }
private void ChangeDisplayType(PageRowDisplayType pageRowDisplayType) { UpdateAndReload(() => { // we need to remove the current innerPanel this.pnlMain.Children.Clear(); if (pageRowDisplayType == PageRowDisplayType.SinglePageRow) this.innerPanel = new SinglePageMoonPdfPanel(this); else this.innerPanel = new ContinuousMoonPdfPanel(this); this.pnlMain.Children.Add(this.innerPanel.Instance); }, this.ViewType); if (this.PageRowDisplayChanged != null) this.PageRowDisplayChanged(this, EventArgs.Empty); }