Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PdfViewer.CreateBars(PdfViewerToolbarKind) Method

Creates a set of toolbars with actions specific to the PdfViewer control.

Namespace: DevExpress.XtraPdfViewer

Assembly: DevExpress.XtraPdfViewer.v24.2.dll

NuGet Package: DevExpress.Win.PdfViewer

#Declaration

public void CreateBars(
    PdfViewerToolbarKind flags
)

#Parameters

Name Type Description
flags PdfViewerToolbarKind

The PdfViewerToolbarKind enumeration value specifying a set of toolbars that should be created.

#Remarks

The code sample below shows how to create Main toolbar:

using DevExpress.XtraBars.Ribbon;
using DevExpress.XtraPdfViewer;

  public Form1()
  {
      InitializeComponent();

      //Create a bar manager:
      BarManager bar = new BarManager();

      //Assign it with a form:
      bar.Form = this;

      //Add the PDF Viewer to the collection
      //of controls on this form:
      this.Controls.Add(pdfViewer);
      pdfViewer.CreateBars(PdfViewerToolbarKind.Main);
  }
See Also