Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9259837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:45:07+00:00 2026-06-18T12:45:07+00:00

I implemented the printer functionnality detailed on this page and I think I stumbled

  • 0

I implemented the printer functionnality detailed on this page and I think I stumbled upon a bug in the printing behavior of System.Windows.Printing. I just added an Image in the layout, like this:

<Grid x:Name="documentRoot">
    <Grid.RowDefinitions>
        <RowDefinition Height="100" />
        <RowDefinition Height="25"/>
        <RowDefinition />
        <RowDefinition Height="25"/>
    </Grid.RowDefinitions>
    <Image x:Name="logo" Source="/MyProject;component/Image/logo.jpg" Grid.Row="0" Width="265" Height="51" HorizontalAlignment="Left" Margin="0,0,0,15" VerticalAlignment="Bottom" />
    <TextBlock x:Name="headerTextBlock" Grid.Row="1" HorizontalAlignment="Center" />
    <TextBlock x:Name="bodyTextBlock" Grid.Row="2" TextWrapping="Wrap" />
    <TextBlock x:Name="footerTextBlock" HorizontalAlignment="Center" Grid.Row="3"/>
</Grid>

What happens with this code is that whenever multiple pages have to be printed for the first time since the application has started, it will skip the first 2 pages and only print the rest of the pages. If you try to print the same thing again it will print the pages nicely as expected, and forever until you restart the application.

Please note that it has nothing to do with the added RowDefinition, as I tried to just remove the Image element and it worked perfectly fine. It is only when I put the Image element in my UserControl that the printer starts going bonkers.

So I am assuming this is yet another “minor” bug that Microsoft won’t ever bother to fix in years, such as this one or some other non-working flags in Powershell that I have had to struggle with in my early days.

This being said, I would be more than happy to be told wrong on this issue. But if I’m not, does anyone have any idea on a workaround?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:45:08+00:00Added an answer on June 18, 2026 at 12:45 pm

    Found a workaround to my problem: converting the image file into a XAML Canvas using this website, and then copy-pasting the whole Canvas code instead of the Image in my PrintPage.xaml file seems to do the trick. Even though it’s quite horrible. I know.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented the usual combination of lexer/parser/pretty-printer for reading-in/printing a type in my
I have implemented a printer delivery extension based on MS example in SSRS 2005.
Implemented a generic repository with several Methods. One of those is this: public IEnumerable<T>
I implemented class that serves as TcpCLient server. Looks like this: { [Export] public
Background This is only my second PyQt4 project. Developing a Windows app that has
I have implemented a simple server-client script like this: Server: class Server(Protocol): def connectionMade(self):
I've implemented quartz.net in windows service to run tasks. And everything works fine on
We currently have check printing fully implemented and in the field for a POS
I have implemented a program, to print the document to the specific printer using
I just joined this wonderful community, but it is with regret that I admit

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.