Nevron Forum
Back
Login
Register
Login
Register
Home
»
Nevron Vision for NET
»
Nevron Chart for .NET
»
How to resolve exception 'cannot convert from...
How to resolve exception 'cannot convert from 'System.Windows.Forms.MouseEventArgs' to...
Post Reply
How to resolve exception 'cannot convert from...
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
Nevron Support
Nevron Support
posted 9 Years Ago
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.2K
Hi Niranjan,
The workaround is correct - we had to decouple the controller implementation from Winforms classes / enum in order to reuse it in WPF as well...
Best Regards,
Nevron Support Team
Reply
Like
0
Niranjan Singh
Niranjan Singh
posted 9 Years Ago
ANSWER
Post Details
Group: Forum Members
Posts: 49,
Visits: 179
Hi,
I have resolved this compile issue by creating a new NMouseEventArgs object from the MouseEventArgs information.
void chartControl_MouseUp(object sender, MouseEventArgs e)
{
if (chartControl.Controller.Tools.Contains(chartDataPanTool))
{
NMouseEventArgs args = new NMouseEventArgs(chartControl.View,
(Nevron.Chart.Windows.MouseButton)Enum.Parse(typeof(Nevron.Chart.Windows.MouseButton), e.Button.ToString()),
e.Clicks, e.X, e.Y, e.Delta);
chartDataPanTool.DoEndDrag(sender, args);
}
}
but I am not sure that does it effect the existing functionality or not. I looking forward with Nevron guys for the correctness of these changes.
Thanks,
Niranjan
Reply
Like
0
Niranjan Singh
Niranjan Singh
posted 9 Years Ago
ANSWER
Topic Details
Group: Forum Members
Posts: 49,
Visits: 179
Hi,
I have updated my project with newer version of Nevron Chart dlls. Now there are lots of change from version 12.x.x.x to 16.1.5.12. Most of build issues has been resolved but on of my required functionality work with the standard control events. Below is code snippet which was working correct with standard .net library objects.
NDataPanTool chartDataPanTool;
void chartControl_MouseUp(object sender, MouseEventArgs e)
{
if (chartControl.Controller.Tools.Contains(chartDataPanTool))
{
chartDataPanTool.DoEndDrag(sender, e);
}
}
Now I am looking for quick fix which resolve such issue with the upgrade.
Thanks,
Niranjan
Tags
chart
winforms
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search