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
Niranjan Singh
Niranjan Singh
posted 10 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_
Mouse
Up(object sender,
Mouse
EventArgs 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
Niranjan Singh
Niranjan Singh
posted 10 Years Ago
ANSWER
Post Details
Group: Forum Members
Posts: 49,
Visits: 179
Hi,
I have resolved this compile issue by creating a new N
Mouse
EventArgs object from the
Mouse
EventArgs information.
void chartControl_
Mouse
Up(object sender,
Mouse
EventArgs e)
{
if (chartControl.Controller.Tools.Contains(chartDataPanTool))
{
N
Mouse
EventArgs args = new N
Mouse
EventArgs(chartControl.View,
(Nevron.Chart.Windows.
Mouse
Button)Enum.Parse(typeof(Nevron.Chart.Windows.
Mouse
Button), 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
change
s.
Thanks,
Niranjan
Reply
Like
0
Nevron Support
Nevron Support
posted 10 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
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