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

  • SEARCH
  • Home
  • 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 5943407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:23:27+00:00 2026-05-22T16:23:27+00:00

I have an image an a textbox. the user enters into the textbox the

  • 0

I have an image an a textbox. the user enters into the textbox the number of copies (N) and clicks print. The printer prints the photo N times (3 photos per page, one under the other).

Hiw would you do something like that? Do I need to first generate a silverlight page?

  • 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-05-22T16:23:28+00:00Added an answer on May 22, 2026 at 4:23 pm

    Silverlight has a really simple to use Printing API. I have recently been using it and learnt how to do so using the tutorial Melodatron listed, and this one over at the Visiblox site. This is specific to their charting library but I still found it very useful.

    I am assuming that you only have 1 image to print at a time here, let me know if you have more. First, you need to set up a grid or something similar to put your photos in. You will need N number of rows in this grid. You’ll have to do this in code behind as you have a certain number of rows you’d like to create, but this can easily be achieved by something like this:

    Grid grid = new Grid();
    
    // Set the column and row definitions
    for (int i = 0; i < Number of rows; i++)
    {
        grid.RowDefinitions.Add(new RowDefinition()); 
    }
    

    That should set up your grid that you need. After you have the grid, you need to populate it with the images that you have. This is pretty straightforward, the only issue will be that your image can’t be used multiple times – i.e. the image that you already have can only appear on the grid once. You will have to duplicate it in order to place it on the grid multiple times. I’m not sure how you are creating your images, but you could possibly create a new image based on the source path of the existing image? There is a thread on how to do this here. You’ll need to give more details if you need help with that.

    // Set the column and row definitions
    for (int i = 0; i < Number of rows; i++)
    {
        // Duplicate your existing image here.
        Image image = new Image();
        grid.Children.Add(image);
        Grid.SetRow(image, i);
    }
    

    All of the code above should be in this method:

    private void printDocument_PrintPage(object sender, PrintPageEventArgs e)
    {
         //Code from above...
    
         e.PageVisual = grid;
    }
    

    In the button event handler where you wish to print, do this:

    private void Button_Click(object sender, RoutedEventArgs e)
    {
         PrintDocument printDocument = new PrintDocument();
         printDocument.PrintPage +=  new EventHandler<PrintPageEventArgs>(printDocument_PrintPage);
         printDocument.Print("TITLE");
    }
    

    Hope this helps!

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

Sidebar

Related Questions

I have a textbox where user will enter the url of the image :
I have wpf user control <StackPanel Orientation=Horizontal> <TextBox Name=txbInterval Text=5/> <Image Name=imgStart Source=Images/start.png/> <Image
I am attaching an asp.net textbox image I want my textbox should have two
Below I have a jquery code which includes a textbox where the user can
I have 3rd party user control (a captcha control), which has a captcha image,
I need to have a textbox (sort of) where the user can enter text
I have a user registration form in PHP .I put captcha image check in
I have a simple textbox, and I would like to show an image if
I have a program that allows a user to type JavaScript in a textbox,
I have image and txt file of same size say 200 KB. Now i

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.