August 17, 2018, 03:22:28 PM

See more Support incidents in our old archived forum.

Author Topic: ContextMenu on dependency line  (Read 1857 times)

ricky.blankenaufulland

  • Customers
  • Newbie
  • *
  • Posts: 18
ContextMenu on dependency line
« on: December 28, 2015, 08:57:54 PM »
Hi,

I am trying to use DependencySpecificLook to provide a ContextMenu on the dependency lines. While setting LineBrush works, it does not seem to work for DependencyLinePathStyle.

DependencySpecificLook look = new DependencySpecificLook();
ContextMenu cm = new ContextMenu();
MenuItem m1 = new MenuItem() {Header = "delete"};
cm.Items.Add(m1);
Style style = new Style();
Setter s1 = new Setter(FrameworkElement.ContextMenuProperty, cm);
style.Setters.Add(s1);
look.DependencyLinePathStyle = style;

Doing this from XAML would be great too. Unfortunately there is no example for DependencySpecificLook - can you provide one?

ricky.blankenaufulland

  • Customers
  • Newbie
  • *
  • Posts: 18
Re: ContextMenu on dependency line
« Reply #1 on: December 29, 2015, 07:44:15 AM »
I am sorry. Actually this works. With a width of 1 the line was just a bit too thin to click it easily. When you aim right the context menu shows up. I am checking if a make the line thicker or something else. Thanks nevertheless.

ricky.blankenaufulland

  • Customers
  • Newbie
  • *
  • Posts: 18
Re: ContextMenu on dependency line
« Reply #2 on: December 29, 2015, 09:11:22 AM »
Okay, what remains is that I seems I cannot set the line brush with the style, only with the property 'LineBrush'. But I would like to use the style to do some DataTrigger stuff for the color...

ForumAdmin

  • Administrator
  • Jr. Member
  • *****
  • Posts: 82
Re: ContextMenu on dependency line
« Reply #3 on: December 29, 2015, 10:06:50 PM »
Ricky, this DependencyLines in FlexyGantt along with varying row heights (via RowHeightBinding) is not supported yet.

Thanks
RQ Support

ForumAdmin

  • Administrator
  • Jr. Member
  • *****
  • Posts: 82
Re: ContextMenu on dependency line
« Reply #4 on: December 29, 2015, 10:09:39 PM »
Ricky, please ignore the previous update.

We will get back to you soon regarding this question.

Thanks
RQ Support

ForumAdmin

  • Administrator
  • Jr. Member
  • *****
  • Posts: 82
Re: ContextMenu on dependency line
« Reply #5 on: December 30, 2015, 12:25:00 PM »
Ricky,

There is a DependencyProperty called DependencyLineBarStroke in class GanttDependencyLine, that you could customize in a style for GanttDependencyLine.

Remember to set DependencySpecificLook.LineBrush to null though.

RQ Support