Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Visual Print not showing any value

$
0
0

Hello,

I am using Some TextBoxes to Get Values for Printing Using Print Dialog Visual Print. All Values are visible in Form But Not Printing in Print.
Here is Image attached for demonstration. 

Here is My code for Printing 

public partial class printWindow : Window
    {
        public string invoiceDate;
        public string invoiceNo;
        public string invoiceTotal;
        public string invoicePaid;
        public Image barcodeImage;
       private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            txtDate.Text = invoiceDate;
            txtInvoiceID.Text = invoiceNo;
            txtPaidAmount.Text = invoicePaid;
            txtInvoiceTotal.Text = invoiceTotal;
            barcodeImg = barcodeImage;

            PrintDialog pd = new PrintDialog();
            pd.PrintVisual(Container, "Invoice Print");
            Close();
        }    
    }

Container is Grid where all the Controls Resides

Thanks for Helping


Jazaib Hussain



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>