We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Disable mouse scrollwheel on SfDiagram

I am trying to create a static diagram, i.e., one that cannot be edited or manipulated in anyway. I have most of this working, but for some reason reason the diagram scrolls vertically (only)  when I use my mouse scroll wheel. Who do I disable this?

I figured this should work, but it doesn't: 

        private void ModulesTreeDiagram_PointerWheelChanged(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
        {
            e.Handled = true;
        }

Any pointers?

5 Replies

RA Ranjitha Amirthalingam Syncfusion Team April 2, 2015 02:30 PM UTC

Hi Robin,

Requirement: Support to disable the ScrollViewer for SfDiagram

We have a support to achieve your requirement. This can be achieved by setting ScrollLimit Property of PageSettings as Diagram.We have provided code snippet to represent this. Please refer to the following code snippet

Code Snippet:

this.DiagramControl.PageSettings.ScrollLimit = ScrollLimit.Diagram;

Here, DiagramControl is the instance of the SfDiagram.

Please let us know if you require further assistance on this

Regards,

Ranjitha A



RM Robin Mestre April 2, 2015 03:03 PM UTC

Hi Ranjitha, thanks for the quick response. 

I made the change you recommended - I set this in code in the ModulesTreeDiagram_Loaded event. Unfortunately, the issue remains I've attached a screenshot for your reference. 

Essentially what I am trying to achieve is to have a diagram of fixed dimensions that cannot be manipulated at all other than when you tap on the nodes, some details in another control will be updated. 

Robin

Attachment: ScrollIssue_3be0f8a4.zip


RA Ranjitha Amirthalingam Syncfusion Team April 3, 2015 07:06 AM UTC

Hi Robin,
Requirement: Support to disable the ScrollViewer for SfDiagram
We have created simple sample to represent your requirement.Please refer to the sample from the following link:
Sample Link:
Scrollviewersample_118707.zip

Sample Details:
In the given sample,we have set height to the Diagram Control which is based on the number of Nodes.

Please let us know if you require further assistance on this
Regards,
Ranjitha A


RM Robin Mestre April 3, 2015 01:00 PM UTC

Hi Ranjitha,

The sample you provided targets Windows 8.0 and references "Syncfusion.SfDiagram.WinRT" which I do not have. I don't know what assembly it is reference but I am using the latest library.  

I believe there is a bug in "Syncfusion 8.1 controls for Universal XAML" - here's the results of my testing ...

  1. I changed the reference to "Syncfusion 8.0 Controls for WinRT XAML" and it runs with the expected behavior (i.e. no scrolling). 
  2. I retargeted the app to Windows 8.1 reference the same library, and it still works. 
  3. I changed the library to "Syncfusion 8.1 Controls for WinRT XAML" and it also works
  4. However, when I reference "Syncfusion 8.1 controls for Universal XAML", the scrolling effect occurs 
Any recommended work around using the Universal controls?

Robin


RA Ranjitha Amirthalingam Syncfusion Team April 6, 2015 12:49 PM UTC

Hi Robin,

We were able to reproduce the problem and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let us know if you require further assistance on this,

Regards,

Ranjitha A.



Loader.
Up arrow icon