Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic using UIElement as custom arrowhead? (Read 3478 times)
dn
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 13
Joined: May 16th, 2008
using UIElement as custom arrowhead?
May 26th, 2008 at 5:11pm
Print Post  
Hi

how can I draw an arbitrary UIElement in place of the normal arrowhead?

the closest thing I can find in the samples is CustomDrawLinks.xaml.cs but all it does it load an XML file

thanks

D.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: using UIElement as custom arrowhead?
Reply #1 - May 27th, 2008 at 4:40am
Print Post  
Hi,

You cannot use UIElements as arrowheads. To enable custom drawing, set DiagramLink.CustomDraw = Additional, and handle the DrawLink event.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
dn
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 13
Joined: May 16th, 2008
Re: using UIElement as custom arrowhead?
Reply #2 - Jun 13th, 2008 at 11:02pm
Print Post  
ok, I have managed to draw my custom UIElement (actually a UserControl) arrowhead shape in the DrawLink event

any suggestions on getting tooltips to work when mousing over? just setting the standard ToolTip property alone isn't enough, I guess the diagram itself is intercepting mouse move and hit testing

for that matter, setting the ToolTip property on a normal DiagramLink doesn't seem to give me a tooltip on mouse over either. Is there a straightforward way to  have a tooltip on a normal link?

the docs have the ToolTip property on the base class DiagramItem so if it worksfor node subclasses, one would hope link subclasses can work too

also I will eventually need to be able to handle click/double-click/right-click on it, any suggestions on how to handle that would be great too

thanks

D.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: using UIElement as custom arrowhead?
Reply #3 - Jun 15th, 2008 at 11:53am
Print Post  
The link tooltips should be fixed in this version:
http://mindfusion.eu/Forum/YaBB.pl?board=wpfdg_disc;action=display;num=121240332...

The LinkClicked / LinkDoubleClicked events should be raised when you click on the arrowhead. You could handle them and check whether the mouse pointer is within the arrowhead shape.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint