Michael,
We have now added support for adding some custom UI elements on top of the "working hours bar". We will send you an assembly by email shortly.
With that new assembly, you can create a custom class like below and use it in XAML to get a label (TextBlock) rendered on top of the working hours bar.
public class MyFGWorkingHoursBar : FGWorkingHoursBar
{
protected override void OnAfterWorkingHoursBarCreated(Rectangle rectangle)
{
Task task = this.DataContext as Task;
// Create a TextBlock with the same dim as rectangle.
TextBlock tb = new TextBlock() { Margin = rectangle.Margin, Width = rectangle.Width, Height = rectangle.Height, HorizontalAlignment = System.Windows.HorizontalAlignment.Left, TextAlignment = TextAlignment.Center, VerticalAlignment = System.Windows.VerticalAlignment.Center };
Canvas.SetZIndex(tb, 10); // To ensure that this render over the Rectangle.
tb.Text = task.TaskName;
this.Children.Add(tb);
}
}
You can then use the above in your XAML:
<fxgantt:FlexyGantt.TaskItemTemplate>
<DataTemplate>
<Grid Height="18" AllowDrop="True"
ToolTipService.ToolTip="{Binding StartTime}">
<local:MyFGWorkingHoursBar HorizontalAlignment="Stretch" TaskBrush="{StaticResource WorkingBarFill}" TaskStrokeBrush="Blue"
NonWorkingTimeTaskBrush="{StaticResource NonWorkingBarFill}" NonWorkingTimeTaskStrokeBrush="Black" NonWorkingBarHeightProportion="25"
SchedulePropertyName="Schedule" >
</local:MyFGWorkingHoursBar>
...........
</Grid>
</DataTemplate>
Thanks
RadiantQ Support