windowsforms-devexpress-dot-xtrapdfviewer-dot-pdfviewer-15d013f2.md
Creates a toolbar with actions specific to the PdfViewer control.
Namespace : DevExpress.XtraPdfViewer
Assembly : DevExpress.XtraPdfViewer.v25.2.dll
NuGet Package : DevExpress.Win.PdfViewer
public void CreateBars()
Public Sub CreateBars
The code sample below shows how to create a 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();
}
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