Page Index Toggle Pages: 1 [2]  Send TopicPrint
Very Hot Topic (More than 25 Replies) WPF diagram from Silverlight diagram (Read 13470 times)
lightsundar99
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 15
Joined: Nov 15th, 2016
Re: WPF diagram from Silverlight diagram
Reply #15 - Mar 16th, 2017 at 4:30am
Print Post  
Thanks for your information.
  
Back to top
 
IP Logged
 
lightsundar99
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 15
Joined: Nov 15th, 2016
Re: WPF diagram from Silverlight diagram
Reply #16 - Apr 7th, 2017 at 4:58am
Print Post  
HI Team,

Thanks for you reply..
now I am not able to see
CreateImage method in diagramLite.dll... but the method is there in Silverlight..
     //
        // Summary:
        //     Creates a bitmap containing an image of the Diagram.
        //
        // Returns:
        //     A BitmapSource instance containing the diagram image.
        public WriteableBitmap CreateImage();
        //
        // Summary:
        //     Creates a bitmap containing an image of the Diagram.
        //
        // Returns:
        //     A Bitmap instance containing the diagram image.
        public WriteableBitmap CreateImage(double scale);

I want to create WritableBitmap of diagram ..
can you please help..



thanks,
Sundar M
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: WPF diagram from Silverlight diagram
Reply #17 - Apr 10th, 2017 at 12:13pm
Print Post  
Hi,

You can find CreateImage implemented here -
https://mindfusion.eu/_temp/diaglite_wpf.zip

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
sundar
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Location: India
Joined: Jul 31st, 2017
Re: WPF diagram from Silverlight diagram
Reply #18 - Jul 31st, 2017 at 8:22am
Print Post  
Hello Team,

We are getting some null exception, when we select the node.This is happening in particular scenario.

I have attached the sample. one small difference is we are not able to create exactly our application sample, due to complexity. But, we created one sample which will give exception and stack trace are same.

Please note : we bought the license , but we are unable to create the ticket in that client login site.

this scenario is very important for us. please let me know.
find the sample from the attach.

this is the stack trace of the exception :

at MindFusion.Diagramming.DiagramItem.UpdateHandleColors()
at MindFusion.Diagramming.DiagramNode.UpdateHandleColors()
at MindFusion.Diagramming.DiagramNode.AddHandlesToCanvas(IList`1 positions)
at MindFusion.Diagramming.DiagramNode.AddHandlesToCanvas()
at MindFusion.Diagramming.DiagramItem.ce6241e517c3ba2caf4d95c5b333db22c()
at MindFusion.Diagramming.DiagramItem.ca108fd0cedf2cfffa1a55c4efffde83c(Boolean cb0c3b0edfc2b9959793e7817a37f4c3b)
at MindFusion.Diagramming.Selection.cba7e5b942846636a9ac87936c5f74c3e(DiagramItem c44ca0f284b2cdfc7b30e75df070b69d8)
at MindFusion.Diagramming.Selection.AddItem(DiagramItem item)
at MindFusion.Diagramming.Selection.OnAddingItem(Object sender, ItemEventArgs`1 e)
at MindFusion.Diagramming.CollectionBase`2.RaiseAdding(T item)
at MindFusion.Diagramming.CollectionBase`2.c896b5d6f6bfae377686f43a2c6330b17(T c44ca0f284b2cdfc7b30e75df070b69d8, Boolean c64a6b2e50e018d29447c32bfe2d017ee)
at MindFusion.Diagramming.CollectionBase`2.Add(T item)
at DiagramSample.MainWindow.fbdiagram_NodeClicked(Object sender, NodeEventArgs e) in c:\Users\sundar\Desktop\DiagramSample\DiagramSample\MainWindow.xaml.cs:line 43
at MindFusion.Diagramming.DiagramBase.OnNodeClicked(NodeEventArgs e)
at MindFusion.Diagramming.DiagramBase.c0e32e526e313735996598053aa1b9df5(NodeEventAr
gs c254d032d8040bc9c0f43a6d59fd515d5)
at MindFusion.Diagramming.DiagramNode.c8bb7088266b58f9e48bf785049eda9a8(Point cbba8e9f1fc36eec5ed12096806f6af2e, MouseButton cf847df5b46daa8fdd2686b933cb9cb6a)
at MindFusion.Diagramming.Diagram.RaiseClicked(DiagramItem item, Point mousePosition, MouseButton mouseButton)
at MindFusion.Diagramming.Diagram.OnMouseLeftButtonUp(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at DiagramSample.App.Main() in c:\Users\sundar\Desktop\DiagramSample\DiagramSample\obj\Debug\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()


steps to reproduce :
1.select the node and again double click on the same node.
2. you will get the exception.
Thanks,
sundar.
  

DiagramSample.zip ( 16 KB | 228 Downloads )
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: WPF diagram from Silverlight diagram
Reply #19 - Jul 31st, 2017 at 5:27pm
Print Post  
Hi,

The control does not expect SelectedItemHandlesStyle to be a null reference, which you set from NodeClicked handler. You could instead keep the style object but set its Stroke and Brush properties to Transparent if you want to hide handles temporarily.

The e.Node.HandlesStyle = HandlesStyle.Invisible assignment you have on next line will hide the handles anyway, so I'm not sure why you'd also need to modify the styles.

Also note that for a single selected node you'll have to modify ActiveItemHandlesStyle; SelectedItemHandlesStyle is used only in multiple selection.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
sundar
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Location: India
Joined: Jul 31st, 2017
Re: WPF diagram from Silverlight diagram
Reply #20 - Aug 1st, 2017 at 5:59am
Print Post  
Kindly note, Stack trace of the issue is real bug for us. But the sample I created not the real scenario, I am getting this bug,
in my application when we select , Can you please provide solution by looking at the stack trace.
Since that is very important scenario for us.

Thanks,
Sundar
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: WPF diagram from Silverlight diagram
Reply #21 - Aug 1st, 2017 at 8:53am
Print Post  
Are you setting SelectedItemStyle to null from your main project too? You will have to remove that line, we do not plan accepting null values for it.
  
Back to top
 
IP Logged
 
sundar
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Location: India
Joined: Jul 31st, 2017
Re: WPF diagram from Silverlight diagram
Reply #22 - Aug 1st, 2017 at 12:39pm
Print Post  
No. we are not using SelectedItemStyle  anywhere in the application. even we are not using selectedItemHandledStyle also.
then also we are getting exception, Can you  arrange some meeting and we can show our code and how we are getting exception, so that you can easily understand and help us.

it will be great help for us, if you provide one meeting slot with your developer or supporting team soon.

Thanks in advance,
Sundar M.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: WPF diagram from Silverlight diagram
Reply #23 - Aug 1st, 2017 at 2:07pm
Print Post  
So why have you decided to set to null in the test project? The stack trace above is from DiagramSample, please post the stack trace from your main project. Please also post the NodeClicked code from main project.
  
Back to top
 
IP Logged
 
sundar
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Location: India
Joined: Jul 31st, 2017
Re: WPF diagram from Silverlight diagram
Reply #24 - Aug 2nd, 2017 at 4:03am
Print Post  
as I mentioned, we are not doing the same  action as test project. we are getting the same exception , in 2 different scenario. But, both are giving the same Stack trace. we randomly tried some scenario to reproduce the same.
then only we got the same stack trace in the test project.

Please note test project and main project stack trace both are almost same.


Main project stack trace are below.
==========================
UniqueId - ae29d52b-5f0a-4a6b-8f1e-0a67eb01b481
ErrorMessage - Object reference not set to an instance of an object.
CustomInfo - System.NullReferenceException: Object reference not set to an instance of an object.
   at MindFusion.Diagramming.DiagramItem.UpdateHandleColors()
   at MindFusion.Diagramming.DiagramNode.UpdateHandleColors()
   at MindFusion.Diagramming.DiagramNode.AddHandlesToCanvas(IList`1 positions)
   at MindFusion.Diagramming.DiagramNode.AddHandlesToCanvas()
   at MindFusion.Diagramming.DiagramItem.ce6241e517c3ba2caf4d95c5b333db22c()
   at MindFusion.Diagramming.DiagramItem.ca108fd0cedf2cfffa1a55c4efffde83c(Boolean cb0c3b0edfc2b9959793e7817a37f4c3b)
   at MindFusion.Diagramming.Selection.cba7e5b942846636a9ac87936c5f74c3e(DiagramItem c44ca0f284b2cdfc7b30e75df070b69d8)
   at MindFusion.Diagramming.Selection.Change(DiagramItem item)
   at MindFusion.Diagramming.BehaviorBase.c5c3bb8a03b003578d6aea7a76278d42e(Point cd972e0554ef635660dd456973984382a)
   at MindFusion.Diagramming.BehaviorBase.OnMouseUp(MouseButtonEventArgs e)
   at MindFusion.Diagramming.Diagram.OnMouseLeftButtonUp(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
StackTrace -    at MindFusion.Diagramming.DiagramItem.UpdateHandleColors()
   at MindFusion.Diagramming.DiagramNode.UpdateHandleColors()
   at MindFusion.Diagramming.DiagramNode.AddHandlesToCanvas(IList`1 positions)
   at MindFusion.Diagramming.DiagramNode.AddHandlesToCanvas()
   at MindFusion.Diagramming.DiagramItem.ce6241e517c3ba2caf4d95c5b333db22c()
   at MindFusion.Diagramming.DiagramItem.ca108fd0cedf2cfffa1a55c4efffde83c(Boolean cb0c3b0edfc2b9959793e7817a37f4c3b)
   at MindFusion.Diagramming.Selection.cba7e5b942846636a9ac87936c5f74c3e(DiagramItem c44ca0f284b2cdfc7b30e75df070b69d8)
   at MindFusion.Diagramming.Selection.Change(DiagramItem item)
   at MindFusion.Diagramming.BehaviorBase.c5c3bb8a03b003578d6aea7a76278d42e(Point cd972e0554ef635660dd456973984382a)
   at MindFusion.Diagramming.BehaviorBase.OnMouseUp(MouseButtonEventArgs e)
   at MindFusion.Diagramming.Diagram.OnMouseLeftButtonUp(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

==================
we are doing selection that time only the exception is raised.
please provide me your mail ID. we will give you more info.

I believe this can be easily solvable, Kindly arrange meeting with your development team.
my mail ID : sundar.muthu@lightpharma.com

Thanks,
Sundar M.

  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: WPF diagram from Silverlight diagram
Reply #25 - Aug 2nd, 2017 at 7:03am
Print Post  
Is this exception coming after a click on a node in the main project too? Please send your code for NodeClicked and selection -related events to support@mindfusion.eu;

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint