RadiantQ Forum

Product => WPF Gantt Package => Topic started by: ricky.blankenaufulland on December 28, 2015, 08:57:54 PM

Title: ContextMenu on dependency line
Post by: ricky.blankenaufulland 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?
Title: Re: ContextMenu on dependency line
Post by: ricky.blankenaufulland 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.
Title: Re: ContextMenu on dependency line
Post by: ricky.blankenaufulland 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...
Title: Re: ContextMenu on dependency line
Post by: ForumAdmin 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
Title: Re: ContextMenu on dependency line
Post by: ForumAdmin 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
Title: Re: ContextMenu on dependency line
Post by: ForumAdmin 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