Barcode Print in WPF

6 posts, 0 answers
  1. Chetan
    Chetan avatar
    26 posts
    Member since:
    Oct 2012

    Posted 08 Dec 2013 Link to this post

    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.
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 11 Dec 2013 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Chetan
    Chetan avatar
    26 posts
    Member since:
    Oct 2012

    Posted 16 Dec 2013 Link to this post

    Thanks,

    It works for me.
  5. Chetan
    Chetan avatar
    26 posts
    Member since:
    Oct 2012

    Posted 15 Jan 2014 Link to this post

    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!
  6. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 17 Jan 2014 Link to this post

    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 >>
  7. paul
    paul avatar
    2 posts
    Member since:
    Sep 2014

    Posted 29 Sep 2014 in reply to Chetan Link to this post

Back to Top
UI for WPF is Visual Studio 2017 Ready