Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Trouble with beamer/remote desktop access in fullscreen (Read 13681 times)
PetrOs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 36
Joined: May 26th, 2011
Trouble with beamer/remote desktop access in fullscreen
Sep 3rd, 2012 at 12:09pm
Print Post  
Hello,

We have a WPF application here, which has several views layouted by Avalon Dock framework. One of the views is based on Mindfusion 2.7.0, using a subclass of a Diagram class including a custom layout algorithm.

We found a problem when the application window is maximized when on a remote desktop or beamer operation (not on a standalone). The effect causes the bounds information being provided wrongly to the layouting algorithm (im currently setting up a remote desktop environment to debug this to find out what bounds are really given to me), and all the tooltips including the ones belonging to other views not based on mindfusion are shown in a top left corner of the screen. This does not happen if no mindfusion view is active, thus I think it is mindfusion issue.

Is it a known issue? Is there a fix for this?

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Trouble with beamer/remote desktop access in fullscreen
Reply #1 - Sep 4th, 2012 at 7:48am
Print Post  
What kind of bounds information is provided wrongly? The diagram Bounds always has a fixed value provided by you, so the control's behavior should not change if it's containing window is maximized.

The Tooltip functionality is inherited from FrameworkElement. The only place I can see tooltips referenced in the DiagramItem code is in the XML serialization methods, so I don't think anything in the diagram control can make visible all tooltips in your application.

As some kind of work-around you might try iterating over all controls in the application when it is maximized and set their ToolTipService.IsOpen attached property to false.
  
Back to top
 
IP Logged
 
PetrOs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 36
Joined: May 26th, 2011
Re: Trouble with beamer/remote desktop access in fullscreen
Reply #2 - Sep 4th, 2012 at 9:11am
Print Post  
Hey

For positioning: The bounds seem to be provided correctly after all, I overrode the OnRender for all my objects and the coordinates for bounds are correct. However, all ShapeNodes created programmatically are still placed in the top left corner of the WPF control (starting point seems to be -1,-1 or similar). Interestingly, it does not affect the TemplatedNodes - these are placed correct. Could it be that the combination of Mindfusion with fullscreen and some video card drivers, including remote desktop graphics driver is causing the effect?

As for tooltips, it does not show them all at the same time. It causes the placement of all tooltips in the top left corner of the main screen, meaning when I roll my mouse over a toolbar button or similar, the tooltip is not shown at the mouse position, but at the top left of the screen...
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Trouble with beamer/remote desktop access in fullscreen
Reply #3 - Sep 4th, 2012 at 11:08am
Print Post  
Are the ShapeNodes placed at positions larger than 0,0 when setting their Bounds, or they are only displayed there? Perhaps the remote desktop viewer you are using shows some snapshot of the diagram from before the WPF layout pass completes. Does it show correct position for a ShapeNode if you move it with the mouse?
  
Back to top
 
IP Logged
 
PetrOs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 36
Joined: May 26th, 2011
Re: Trouble with beamer/remote desktop access in fullscreen
Reply #4 - Sep 4th, 2012 at 12:39pm
Print Post  
Hello,

Yes, they are placed at positions different from 0,0 (the one I use for debugging is placed for example at 138,257). Placement occurs inside of the OnRender override (before calling base.OnRender()), and is done by using Move. I tried enabling node resize and movement, but while this was giving a visible effect with the non-full-screen operation, it was not possible to resize nodes in full screen.


It cant be a snapshot, as it also happens when using a beamer on laptop's external connector.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Trouble with beamer/remote desktop access in fullscreen
Reply #5 - Sep 4th, 2012 at 1:14pm
Print Post  
If you mean you are overriding UIElement.OnRender and setting nodes' Bounds from there, I'm pretty sure it's not a good place to do that. Changing an element's position causes a new WPF arrange pass, after which OnRender is called again, etc. WPF has some protections to avoid infinite recursion like that, and perhaps stops the arrange phase at some point before the shape nodes actual positions in the visual tree are set. Try arranging the nodes from some kind of Loaded event handler instead.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PetrOs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 36
Joined: May 26th, 2011
Re: Trouble with beamer/remote desktop access in fullscreen
Reply #6 - Sep 4th, 2012 at 2:03pm
Print Post  
The OnRender override belongs to the owner class, which is a subclass of a DiagramLink. I want to place several ShapeNodes around the link. I can not arrange them in constructor, as at that time, the link is not yet anchored at the ends. Maybe you can suggest a better place to do this?
  
Back to top
 
IP Logged
 
PetrOs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 36
Joined: May 26th, 2011
Re: Trouble with beamer/remote desktop access in fullscreen
Reply #7 - Sep 4th, 2012 at 2:57pm
Print Post  
I tried to remove all Placement operations from OnRender, and the effect still happens....

Also, I tried to replace the ShapeNodes with primitive templatedNodes (with just a text field), to no effect....
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Trouble with beamer/remote desktop access in fullscreen
Reply #8 - Sep 4th, 2012 at 3:09pm
Print Post  
Does that happen only for the nodes that are shown by the custom link? If you are adding these nodes dynamically from OnRender, that will lead to running the arrange phase too.

If you need to add or arrange nodes for links drawn interactively by the user, a suitable place to do that might be the CompleteCreate and Completemodify overrides. If you need to place them after programmatically arranging the link points, just add a new link method that arranges the nodes and call it after link's control points are set (make sure that happens outside of any OnRender too).
  
Back to top
 
IP Logged
 
PetrOs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 36
Joined: May 26th, 2011
Re: Trouble with beamer/remote desktop access in fullscreen
Reply #9 - Sep 4th, 2012 at 3:28pm
Print Post  
This happens also if a owner class is a subclass of a templated node. I would probably refactor the onRender manipulations out anyways, thanks for the idea there, but it does not solve the problem... with OnRender overrides commented out and shapenodes rigidly placed in the middle of the screen in constructor, both effects (all shape nodes on top-left of a view, and tooltips in the top-left of a screen) still happen....
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Trouble with beamer/remote desktop access in fullscreen
Reply #10 - Sep 4th, 2012 at 4:08pm
Print Post  
If you run the control's demo in that configuration, does it show the sample diagrams correctly?
  
Back to top
 
IP Logged
 
PetrOs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 36
Joined: May 26th, 2011
Re: Trouble with beamer/remote desktop access in fullscreen
Reply #11 - Sep 5th, 2012 at 6:49am
Print Post  
I can run all the demos from the mindfusion installation directory in such a mode without any noticeable quirks...

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Trouble with beamer/remote desktop access in fullscreen
Reply #12 - Sep 5th, 2012 at 7:27am
Print Post  
If you load one of the demo files into your application using LoadFromXml, does it show any issues? If it doesn't, then the problem is caused by something in the custom link or node classes. If it does, then you should look for the problem somewhere else in the app.

You might also check if calling diagram.UpdateLayout from some button handler fixes the diagram appearance; if it does, probably the WPF arrange pass was stopped by something outside of the diagram objects.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PetrOs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 36
Joined: May 26th, 2011
Re: Trouble with beamer/remote desktop access in fullscreen
Reply #13 - Sep 5th, 2012 at 1:04pm
Print Post  
Hey,

I tried this both, to no effect. However, I noticed several effects which tip that it might be not Mindfusion Issue, but rather caused by AvalonDock framework issues - it only happens when the view is docked in specific areas, and not in autohide mode of avalondock.... we will try to upgrade to the most recent avalon dock in the next few weeks (there was a major version change there with a total code change), and see if the problem still happens.
Thank you for your help anyways! Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint