Nevron Forum

Disable Rotation Exception

https://www.nevron.com/Forum/Topic4394.aspx

By Volvick Derose 1 - Tuesday, October 26, 2010

By using the code below, I try to remove the visibility of the rotation point when users try to rotate a shape. However when I try to do that, the program keep crashing. I wonder is there another way to do that?


private void EventSinkService_NodeBoundsChanged(NNodeEventArgs args)
{
NShape myShape = args.Node as NShape;

if (myShape == null)
{
return;
}
if (myShape.Name == "test")
{
if (myShape.Transform.IsRotate == true)
{
MessageBox.Show("test");

NInteractionStyle interactionStyle = myShape.InteractionStyle;
interactionStyle.Rotation = false;
myShape.InteractionStyle = interactionStyle;
}
}
}