RadiantQ Forum
Product => WPF Gantt Package => Topic started 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?
-
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.
-
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...
-
Ricky, this DependencyLines in FlexyGantt along with varying row heights (via RowHeightBinding) is not supported yet.
Thanks
RQ Support
-
Ricky, please ignore the previous update.
We will get back to you soon regarding this question.
Thanks
RQ Support
-
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