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