This is a migrated thread and some comments may be shown as answers.

Barcode Print in WPF

5 Answers 458 Views
BarCode
This is a migrated thread and some comments may be shown as answers.
Chetan
Top achievements
Rank 1
Chetan asked on 08 Dec 2013, 08:38 AM
Dear Concerned

I have checked documentation for Bar code 128 and other barcodes but not able to get how to print it.
I have reached to barcode silveright and WPF . Where it is explained that
Private void Button_Click( object sender, RoutedEventArgs e)
{
   PrintDocument document =  new PrintDocument ();
    document.PrintPage += (s, args) =>
    {
       args.PageVisual = this.radBookItem1;
    };
    document.Print("Silverlight Printing Demo");
};

but not getting "PrintDoument" dll, Also if feasible please provide sample in vb.net

Thanks in Advance.

5 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 11 Dec 2013, 04:19 PM
Hi Chetan,

The code that you have found demonstrates how to print bar codes using Silverlight’s printing support. For RadBarcode for WPF you can use the following code:
 
private void Print()
{
    PrintDialog dialog = new PrintDialog();
    if (!(bool)dialog.ShowDialog())
    {
        return;
    }
 
    dialog.PrintVisual(this.RadBarcode1, "MyDocument");
}

VB version:
Private Sub Print()
    Dim dialog As New PrintDialog()
    If Not CBool(dialog.ShowDialog()) Then
        Return
    End If
 
    dialog.PrintVisual(Me.RadBarcode1, "MyDocument")
End Sub

Regards,
Tsvetie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Chetan
Top achievements
Rank 1
answered on 17 Dec 2013, 04:27 AM
Thanks,

It works for me.
0
Chetan
Top achievements
Rank 1
answered on 16 Jan 2014, 04:26 AM
Hi have one extended query on same topic,
How to set printer to print if have multiple network printers installed for system,
I want to print barcode on zebra printer, but it is not default printer on my system.

Please help!
0
Tsvetie
Telerik team
answered on 17 Jan 2014, 11:29 AM
Hello Chetan,

Please note that your questions is not releated to RadBarcode for WPF or any of the Telerik products. Basically, you can find information about changing the default printer or choosing a printer from the Print dialog box on the net.

Let us know if you have any other issues related to Telerik controls.

Regards,
Tsvetie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
paul
Top achievements
Rank 1
answered on 30 Sep 2014, 03:28 AM
Tags
BarCode
Asked by
Chetan
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Chetan
Top achievements
Rank 1
paul
Top achievements
Rank 1
Share this question
or