Back to Devexpress

PdfViewer.CreateBars() Method

windowsforms-devexpress-dot-xtrapdfviewer-dot-pdfviewer-15d013f2.md

latest2.0 KB
Original Source

PdfViewer.CreateBars() Method

Creates a toolbar with actions specific to the PdfViewer control.

Namespace : DevExpress.XtraPdfViewer

Assembly : DevExpress.XtraPdfViewer.v25.2.dll

NuGet Package : DevExpress.Win.PdfViewer

Declaration

csharp
public void CreateBars()
vb
Public Sub CreateBars

Remarks

The code sample below shows how to create a toolbar:

csharp
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();
  }
vb
Imports DevExpress.XtraBars.Ribbon
Imports DevExpress.XtraPdfViewer

Public Sub New()
    InitializeComponent()

    ' Create a bar manager:
    Dim bar As BarManager = New BarManager()

    ' Assign it with a form:
    bar.Form = Me

      'Add the PDF Viewer to the collection
      'of controls on this form:
    Me.Controls.Add(pdfViewer)
    pdfViewer.CreateBars()
End Sub

See Also

Get Started with WinForms PDF Viewer (.NET Framework)

PdfViewer Class

PdfViewer Members

DevExpress.XtraPdfViewer Namespace