Page Index Toggle Pages: 1 [2]  Send TopicPrint
Hot Topic (More than 10 Replies) Question about behavior class (Read 8524 times)
CanadaProgrammer
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 113
Joined: Jun 30th, 2011
Re: Question about behavior class
Reply #15 - Feb 15th, 2013 at 12:06am
Print Post  
hi Stoyan,

Are you here? If this version can not implement this feature or it is a bug then just tell me, I will choose original way to implement this feature. Otherwise I hope you will give me help, I just want to do best to develop my software, I think you are too.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Question about behavior class
Reply #16 - Feb 15th, 2013 at 3:55pm
Print Post  
Hi,

The problem in your case is that a selected item is not being modified. The cache image used for fast drawing during interaction contains all items not being modified, and they are drawn without selection handles since the control expects they will be rendered for the modified items later. One way to circumvent this is to override the diagram's Draw method, which is called when creating the cache image:

Code
Select All
namespace TestCustomBehaviour
{
	class MyDiagram: Diagram
	{
		public override void Draw(IGraphics graphics, RenderOptions options, RectangleF clipRect, bool noModifiedItems)
		{
			base.Draw(graphics, options, clipRect, noModifiedItems);

			if (noModifiedItems && ActiveItem != null && !ActiveItem.NowModifying())
			{
				// draw the handles of ActiveItem in modification cache image
				ActiveItem.DrawHandles(graphics, ActiveItemHandlesStyle);
			}
		}
	}
} 



and also remove the this.diagram1.SelectionOnTop = false line, which prevents correct order of selection handles drawn in the cache.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint