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

Diagram Threading

Hi, I´d like to animate Shape properties like FillColor, LineColor, ... . Therefore I do [code] Shape.SetPropertyValue("FillColor", Color.Red) [/code] inside my own thread. This does the trick but I run into problems when I now have e.g. MouseMove´s over the Diagram. These events block the updates of my new FillColor settings. How can I make sure that my new props will be set even when there are user inputs on the diagram? best regards, Uli

3 Replies

MF Meera Fathima Syncfusion Team October 28, 2005 07:18 AM UTC

Hi, Kindly refer the Diagram Samples/DynamicSymbol sample. The MySymbol.cs class will give you an idea about how the symbol responds to MouseEvents. Please let me know if you have any queries on this issue. We will be glad to assist. Thanks and Regards, Meera.


JS Johann Schraml October 28, 2005 09:02 AM UTC

Hi Meera, I think I did not describe my problem in a sufficient manner. I integrate a live value interface in all Diagram´s which gets the values from a process data server e.g. all 500ms. Every value change I´d like to animate a particular property of a Symbol which is defined from the user at draw time. Therefore I build some dialogs where the user can input the information for the animation like: decimal lowLimit = 0; decimal highLimit= 100; //FillStyle Color fillColor = Color.Red; Symbol rectangle = (Rectangle)Diagram.Model.Node; ... When the diagram now receives a value change callback and the value is in the limits the Rectangle should set his FillColor property to Red or to other user colors. The callback runs in his own thread container. rectangle.SetPropertyValue("FillColor", newColor); So far there is no problem with Rectangle.Update even when I get a lot of callbacks. But I have a problem when I do a lot of MouseMove´s over the Rectangle when the animation is running. This moves are blocking the update of e.g. the new color change. I think this problem has to do with different thread priorities and may is not a problem of your side. Do you have an idea of how I can force the symbol to update his property even when there are heavy MouseMove´s or other gui inputs? Please let me know, when you need more information. best regards, Uli


MF Meera Fathima Syncfusion Team October 31, 2005 06:57 AM UTC

Helli Uli, Please try to force the Diagram to refresh itself immediately after the ''SetPropertyValue(...) call, by invoking the diagram.Model.UpdateAllViews() and diagram.Refresh() methods right after the property change. As thread management is completely local to your application, I am afraid I can''t afford much more help on this issue. Thanks for your support to Syncfusion. Regards, Meera.

Loader.
Live Chat Icon For mobile
Up arrow icon