We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to disable the chart saving dialog

Thread ID:

Created:

Updated:

Platform:

Replies:

93174 Mar 1,2010 06:44 AM Mar 9,2010 10:29 PM WPF 5
loading
Tags: Chart
Olivier VAYSSIE
Asked On March 1, 2010 06:44 AM

Hello,

In the program attached, if you click on the floppy disk, my save function is called. If you click on the chart, and then on the floppy disk, a chart saving dialog appears (to save in picture format). How can I disable the popping of this dialog and keep the call to my saving function ?
By the way this dialog could become handy, is there any way to make it appear via the charts API ?
Thank you for your help.

Cordially,

Olivier Vayssié



ChartPictureSaveDialog_c710ba69.rar

Poorani Idhaya Bala M.A [Syncfusion]
Replied On March 3, 2010 01:59 AM

Hi Olivier,

Thanks for choosing Syncfusion Products.

Application.Save command is binded in the chart control to save the chart.If the chart is focused, save function which is defined in the chart assembly is called instead of the user defined function. To avoid this ,please cancel the function calling by setting the e.Handle value to true in previewMouseDown event of the chart control.

Please find the attached sample.

Let me know if you have any questions.

Thanks,
Poorani



ChartPictureSaveDialog_5b3c5661.zip

Olivier VAYSSIE
Replied On March 3, 2010 07:07 AM

Thank you for your answer. The problem is I need to compute the clicks (left and right) on the children of chart (area, series, etc..). With this solution I don't receive the events anymore.
Cordially,
Olivier Vayssié

Poorani Idhaya Bala M.A [Syncfusion]
Replied On March 5, 2010 08:00 AM

Hi Olivier,

Thanks for choosing Syncfusion Products.

Please find the attached sample. You can achieve your requirement by overriding the event handler method of the chart by your method.

C#:

this.Chart1.CommandBindings.Add(new CommandBinding(ApplicationCommands.Save, SaveExecute));

Let me know if you have any questions.

Thanks,
Poorani



ChartPictureSaveDialog (2)_552e125.zip

Olivier VAYSSIE
Replied On March 8, 2010 05:26 AM

Hello,
It works. In SaveExecute, I used the code
void SaveExecute(object sender, ExecutedRoutedEventArgs e)
{
FrameworkElement fe = Parent as FrameworkElement;
if(fe!=null)
fe.RaiseEvent(e);
}
to get the save of my application to pop.

Cordially,

Olivier Vayssié

Poorani Idhaya Bala M.A [Syncfusion]
Replied On March 9, 2010 10:29 PM

Hi Olivier,


Thanks for choosing Syncfusion products.

We are glad to hear that your problem has been resolved. Please do not hesitate to open a new forum if you ever need further assistance from us.

Regards,
Poorani

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;