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 7443675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:22:07+00:00 2026-05-29T11:22:07+00:00

In my application, I have a chart (WPF Toolkit) in normal resolution/size (for example

  • 0

In my application, I have a chart (WPF Toolkit) in normal resolution/size (for example 640×480). I want to export this chart to an image in different resolutions (for example 800×600 or greater).

Currently, I use these lines of codes:

var path = String.Format(@"C:\Temp\chart-{0}.bmp", DateTime.Now.Ticks);
var renderBitmap = new RenderTargetBitmap((int)xamChart.ActualWidth,
                                          (int)xamChart.ActualHeight,
                                          96d,
                                          96d,
                                          PixelFormats.Pbgra32);
renderBitmap.Render(xamChart);

// Create a file stream for saving image
using (var outStream = new FileStream(path, FileMode.Create))
{
   // Use png encoder for our data
   var encoder = new BmpBitmapEncoder();

   // push the rendered bitmap to it
   encoder.Frames.Add(BitmapFrame.Create(renderBitmap));

   // save the data to the stream
   encoder.Save(outStream);
}

It works very well, but if I want to save in greater resolution, I need to change size of the chart. These changes of sizes are visible on my form and are not acceptable. Is there a way to keep the original size of the element and save it as an image in different sizes?

PS. I don’t want save the chart to an image in its original size and in then change the image size, because I lose image quality.

PPS. Second solution: Maybe someone knows how to export a WPF element to vector graphics?

  • 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-29T11:22:08+00:00Added an answer on May 29, 2026 at 11:22 am

    I have not tried it at all but it might be possible to do what you ask by increasing the DPI(the forth and fifth argument to RenderTargetBitmap)

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

Sidebar

Related Questions

I have a save as image feature for charts in my application. The chart
I want to use bar chart in web application. I have searched many libraries
I'm writing a WPF calculator app. In this application I have TextBox that get
In my application, I have a chart that I want to display in a
I have application which can export slides to PowerPoint. I'm using Microsoft.Office.Interop.PowerPoint.dll . This
I have a flex application showing a chart. I want to give user the
I am developing a web application which has Chart Controls. I have developed a
i have a simple chat application in flex 3 and i want to make
I have a WPF application in which I have a hook at PreviewTextInput, through
I have a simple WPF windows application trying to read a serial port with

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.