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
close icon

Read only mode/view only diagram

Hi,

How to create readonly diagram control (WinForms)? I read some post where you suggest to deactivate all tools except zoom and pan but meybe you have new solution for this?

Now I set Enable property to false but scrolls and some tools not working (it wasn't problem for us till now so I have to create readonly diagram)

How to achieve my needs?

Best regards,
Klaudiusz

3 Replies

AK Ashok Kumar V Syncfusion Team November 6, 2013 12:18 PM UTC

Hi Klaudiusz,

Thanks for your Interest in Syncfusion product,

We are glad to inform you that we have created a simple sample to achieve your requirement and same can be downloaded from the below link.

Please try the sample and let us know if you have any queries.

Regards,

Ashok Kumar



Forum_114197_98cbc88e.zip


EN enova November 7, 2013 09:23 AM UTC

Hi,

This is not what I need. If you set diagram.Enable on false scrolls doesn't work but I want them to work. Look on your sample - you can't move scroll.
I need solution where all operations are blocked except zoom, pan and scrolls. Do you have any solution (e.g. diagram.ReadOnly)?

Best regards,
Klaudiusz


AK Ashok Kumar V Syncfusion Team November 11, 2013 12:08 PM UTC

Hi Klaudiusz,

Thanks for your update,

We suggest you to set node’s “Editstyle” property “AllowSelect” to false to achieve your requirement. Please refer the below code snippet for your reference.

[C#]

 

    Syncfusion.Windows.Forms.Diagram.Ellipse ellip = new Syncfusion.Windows.Forms.Diagram.Ellipse(300, 200, 100, 70);

            AddLabel(ellip, "Ellipse", Position.Center);

ellip.EditStyle.AllowMoveX = false;

            ellip.EditStyle.AllowMoveY = false;

//AllowSelect indicating whether node can be Selected or not

            ellip.EditStyle.AllowSelect = false;

            diagram1.Model.AppendChild(ellip);

 

 

Please try the sample and let us know if you have any queries.

Regards,

Ashok Kumar

 



114197_8795c77.zip

Loader.
Live Chat Icon For mobile
Up arrow icon