Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Pan and Zoom (Read 12947 times)
Jesarg
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Feb 13th, 2008
Pan and Zoom
Feb 15th, 2008 at 9:31pm
Print Post  
I've managed to get the zoom functionality to work, but I can't get the panning functionality to do anything.

According to the Programmer's Guide:
--
Panning
The diagram view can be panned by holding ALT while dragging the mouse with the left button down. Another modifier key can be used for panning by setting ModifierKeyActions. The MiddleButtonActions and RightButtonActions properties let you use the middle or right mouse button to start panning. WpfDiagram displays the PanCursor while panning.
--

I tried all of the above, but none worked; for each test, the diagram either did the default functionality (as if the modifier key was not pressed) or nothing happened at all.

If you could post a small sample to help me out, that would be great.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Pan and Zoom
Reply #1 - Feb 18th, 2008 at 6:53am
Print Post  
That's a bug. We will fix this and upload a new diagramming.dll here later today.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Pan and Zoom
Reply #2 - Feb 18th, 2008 at 2:23pm
Print Post  
This version fixes panning:
https://mindfusion.org/_beta/wpf_pan.zip

However I've seen it introduces another bug - if the Width and Height attributes are used in the Diagram element they also change the Bounds size. Since the VS2008 designer automatically sets them to the available size inside the ScrollViewer, this disables scrolling. For now, just remove the Width and Height assignments from the xaml file and everything should work fine. We will upload a version that fixes that tomorrow.

Stoyan
  
Back to top
 
IP Logged
 
Jesarg
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Feb 13th, 2008
Re: Pan and Zoom
Reply #3 - Feb 25th, 2008 at 7:48pm
Print Post  
Do you have a version out now that I can test panning on?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Pan and Zoom
Reply #4 - Feb 26th, 2008 at 8:48am
Print Post  
Try this version:
https://mindfusion.org/_beta/wpf_pan.zip

It also includes a fix for a bug in the auto-scroll feature, in case anyone needs it.

Stoyan
  
Back to top
 
IP Logged
 
Jesarg
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Feb 13th, 2008
Re: Pan and Zoom
Reply #5 - Feb 27th, 2008 at 3:25pm
Print Post  
I removed the reference to my original DLL and added a reference to the new DLL that you just provided.

I still can't manage to get the panning feature to do anything (or get the PanCursor to appear).

Either I am doing something wrong, or the panning feature is still disabled.  Let me know which is the case (and when I can test the panning feature, if it is still unavailable).

I have been trying to test panning by Alt+[left mouse dragging] on the diagram (and also by setting RightButtonActions to MouseButtonActions.Pan and doing right-mouse-dragging on the diagram).
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Pan and Zoom
Reply #6 - Feb 27th, 2008 at 5:37pm
Print Post  
Check if the dll in your project's bin/debug folder is the same as the one from the zip. If it's an older one, open the project properties -> reference paths and make sure the first path listed there is to the new dll. Additionally, the reference properties -> specific version option should be set to "false".

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


I love YaBB 1G - SP1!

Posts: 7
Joined: Feb 13th, 2008
Re: Pan and Zoom
Reply #7 - Feb 27th, 2008 at 8:02pm
Print Post  
The problem wasn't any of the above, but I found the cause.  Although Visual Studio was telling me that the build succeeded, it was not re-creating the executable when the new reference was replacing the old one.

After noticing this, I made a new project altogether, and I added a new tab in the Visual Studio Toolbox for the beta DLL that you just posted yesterday.  However, attempting to create a Diagram control using the toolbox icon created from this DLL results in the error message "Couldn't get design-time license for "MindFusion.Diagramming.Wpf.Diagram".

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Pan and Zoom
Reply #8 - Feb 28th, 2008 at 8:06am
Print Post  
Import this into the Windows registry:
https://mindfusion.org/_beta/wpflic.zip

Stoyan
  
Back to top
 
IP Logged
 
Jesarg
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Feb 13th, 2008
Re: Pan and Zoom
Reply #9 - Feb 28th, 2008 at 3:32pm
Print Post  
Thanks for the reg file, it fixed the previous problem.  However, panning still doesn't work.

I have a new WPF project with the constuctor being as follows:

public Window1()
{

InitializeComponent();

diagram1.RightButtonActions = MouseButtonActions.Pan;

diagram1.MiddleButtonActions = MouseButtonActions.Select;

diagram1.PanCursor = Cursors.Help;

diagram1.BackBrush = Brushes.Beige;
}

The middle mouse button correctly does selecting, as I expected.
The background color is beige, as I expected.

When I click the diagram with the right mouse button and drag the mouse, the cursor does not change, and the diagram does not switch to a panned view.  Alt-Left-click has the same functionality as a regular left click (creating boxes on the diagram) and does not change the view or the cursor.

The executable built correctly.
The MindFusion.Diagramming.Wpf DLL has the path of the new beta dll.
The MindFusion.Diagramming.Wpf DLL in my bin/debug directory has a Date Modified of 2/26/2008 12:39 PM, which I expected.

Can you get panning to work with the provided DLL on your machine?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Pan and Zoom
Reply #10 - Feb 28th, 2008 at 5:23pm
Print Post  
I have just tried this with the version we uploaded today -

https://mindfusion.org/_beta/overview.zip

and started FCDemo.exe in the Samples\C#\FCDemo\Files folder. Alt + Drag works fine for me.

Have you placed your Diagram inside a ScrollViewer, and is the document big enough for scrollbars to appear? I think that's required for panning to work.

Stoyan
  
Back to top
 
IP Logged
 
Jesarg
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Feb 13th, 2008
Re: Pan and Zoom
Reply #11 - Feb 28th, 2008 at 6:59pm
Print Post  
Thanks; it works as expected now.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint