Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Diagram on Tablet (Read 12742 times)
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Diagram on Tablet
Feb 9th, 2017 at 5:26pm
Print Post  
Hi Stoyo,

I have a question about Win Form version of diagram. How can I make it better when running the diagram application on a tablet using touch screen? It is very hard to move the element around or resize it. Any suggestion on this?

Thanks!

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


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Diagram on Tablet
Reply #1 - Feb 9th, 2017 at 5:46pm
Print Post  
Hi,

You could set larger AdjustmentHandlesSize to make handles easier to grab. This will also make their visible size larger - if you don't want that, set HandlesStyle to Custom and implement DrawAdjustmentHandles and HitTestAdjustmentHandles events.

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


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Diagram on Tablet
Reply #2 - Feb 9th, 2017 at 5:59pm
Print Post  
you could also create a custom Behavior class that lets user move nodes without selecting first and without aiming at adjustment handles - override StartDraw and return InteractionState(node, Handles.Move, Action.Modify) if a node contains the point. Do hit-testing for adjustment handles only if a node is selected, otherwise move?
  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Diagram on Tablet
Reply #3 - Feb 9th, 2017 at 9:43pm
Print Post  
This does help to locate the handlers. Thanks.

Slavcho wrote on Feb 9th, 2017 at 5:46pm:
Hi,

You could set larger AdjustmentHandlesSize to make handles easier to grab. This will also make their visible size larger - if you don't want that, set HandlesStyle to Custom and implement DrawAdjustmentHandles and HitTestAdjustmentHandles events.

Regards,
Slavcho
Mindfusion

  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Diagram on Tablet
Reply #4 - Feb 9th, 2017 at 9:44pm
Print Post  
Cool, this is the one to move the selections.
Thanks! Wink
Slavcho wrote on Feb 9th, 2017 at 5:59pm:
you could also create a custom Behavior class that lets user move nodes without selecting first and without aiming at adjustment handles - override StartDraw and return InteractionState(node, Handles.Move, Action.Modify) if a node contains the point. Do hit-testing for adjustment handles only if a node is selected, otherwise move?

  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Diagram on Tablet
Reply #5 - Feb 13th, 2017 at 3:39pm
Print Post  
Hello Slavcho,

I tried this on tablet today and found it didn't work as expected. Moving left/right is OK but whenever I try to move up/down a node(no matter it's selected or not, it will scroll the document up and down - looks like the scroll bar has higher priority.

And for resizing handler, even I already resize it to big enough, it's still hard to grab and resize the node. Can you check it?

Thanks,

Kyle

Kyle Chen wrote on Feb 9th, 2017 at 9:44pm:
Cool, this is the one to move the selections.
Thanks! Wink
Slavcho wrote on Feb 9th, 2017 at 5:59pm:
you could also create a custom Behavior class that lets user move nodes without selecting first and without aiming at adjustment handles - override StartDraw and return InteractionState(node, Handles.Move, Action.Modify) if a node contains the point. Do hit-testing for adjustment handles only if a node is selected, otherwise move?


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


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Diagram on Tablet
Reply #6 - Feb 14th, 2017 at 7:41am
Print Post  
Our guess is you are getting this 'legacy support for panning' -
https://msdn.microsoft.com/en-us/library/windows/desktop/dd562171(v=vs.85).aspx

Try setting the TABLET_DISABLE_FLICKS flag from the end of the article using PInvoke to see if it stops scrolling. Another option could be to use Application.AddMessageFilter to stop WM_GESTURE messages.

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


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Diagram on Tablet
Reply #7 - Feb 14th, 2017 at 8:11am
Print Post  
The SetGestureConfig method here worked for us -
https://msdn.microsoft.com/en-us/library/windows/desktop/dd353241(v=vs.85).aspx

with interop code from here -
https://assab.cs.washington.edu/svn/prototypes/MultiTouchGestureTest01/MultiTouc...

setting this in WndProc lets us draw and hit-test without Windows trying to pan -

Code
Select All
GESTURECONFIG gc = new GESTURECONFIG();
gc.dwID = 0;
gc.dwWant = 0;
gc.dwBlock = GC_ALLGESTURES; 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Diagram on Tablet
Reply #8 - Feb 16th, 2017 at 4:58pm
Print Post  
Hi Slavcho,

You're correct on this. When I block all gestures, I can move the node around.

If we can get this, it'll be much better(I'm too picky Grin):
Once one or more nodes are selected, and user touch point is on any of the selection, it will move the selection. Otherwise it will scroll the document.

Please advise. Thank you!

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


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Diagram on Tablet
Reply #9 - Feb 20th, 2017 at 8:44am
Print Post  
Hi,

There's a PanAndModify behavior that does that in some Mindfusion controls for other platforms, we'll try to implement it for Windows Forms in next few days.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Diagram on Tablet
Reply #10 - Feb 20th, 2017 at 4:35pm
Print Post  
Cool. Looking forward to this new feature...Thanks!
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Diagram on Tablet
Reply #11 - Feb 22nd, 2017 at 5:26pm
Print Post  
You can find PanAndModify behavior implemented here -
https://mindfusion.eu/_beta/diag_panmod.zip

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Diagram on Tablet
Reply #12 - Feb 27th, 2017 at 6:29pm
Print Post  
Thank you! I will try this out soon.
So it will be included in next formal release?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Diagram on Tablet
Reply #13 - Feb 28th, 2017 at 8:38am
Print Post  
It will be included, sure.
  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Diagram on Tablet
Reply #14 - Mar 1st, 2017 at 5:02pm
Print Post  
Hi Slavcho,

However I couldn't find PanAndModify behavior in the beta package. Can you check that?
Thanks!

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