Represents the element which displays the graphical part of a RadGanttView.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class GanttViewGraphicalViewElement : GanttViewBaseViewElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementScrollViewElement<VirtualizedStackContainer<GanttViewDataItem>>VirtualizedScrollPanel<GanttViewDataItem, GanttViewBaseItemElement>GanttViewBaseViewElementGanttViewGraphicalViewElement...
Implements:
Inherited Members
Constructors
Initializes a new instance of the GanttViewGraphicalViewElement class.
public GanttViewGraphicalViewElement(RadGanttViewElement ganttView)
The gantt view.
Fields
public static RadProperty LinksColorProperty
public static RadProperty LinksHandlesSizeProperty
public static RadProperty LinksSelectionClickTresholdProperty
public static RadProperty LinksSelectionColorSpreadProperty
public static RadProperty ShowTimelineTodayIndicatorProperty
public static RadProperty ShowTodayIndicatorProperty
Properties
Gets or sets a value indicating whether the TimeRange of the gantt view will be handled by the control.
public bool AutomaticTimelineTimeRange { get; set; }
Gets the horizontal scroll bar element.
public RadScrollBarElement HorizontalScrollBarElement { get; }
The horizontal scroll bar element.
Gets or sets a value indicating whether a new link is being created.
protected bool IsCreatingLink { get; set; }
true if a new link is being created; otherwise, false.
Gets or sets the color of the links.
public Color LinksColor { get; set; }
The color of the links.
Gets or sets the size of the links handles.
public Size LinksHandlesSize { get; set; }
The size of the links handles.
Gets or sets how many pixels along the link of a link will trigger selection.
public int LinksSelectionClickTreshold { get; set; }
Gets or sets how wide the selection highlight color will be painted along a selected link.
public int LinksSelectionColorSpread { get; set; }
Gets or sets the new link instance. This is not null when a new link is being created.
protected GanttViewLinkDataItem NewLink { get; set; }
The new link.
Gets or sets how much time a single pixel represents.
public TimeSpan OnePixelTime { get; set; }
The one pixel time.
Gets or sets a value indicating whether to show the timeline today indicator.
public bool ShowTimelineTodayIndicator { get; set; }
true if the timeline today indicator is visible; otherwise, false.
Gets or sets a value indicating whether to show the today indicator.
public bool ShowTodayIndicator { get; set; }
true if the today indicator is visible; otherwise, false.
Gets or sets the behavior which handles the perations related to the gantt view timeline items.
public BaseGanttViewTimelineBehavior TimelineBehavior { get; set; }
Gets the timeline container.
public GanttViewTimelineContainer TimelineContainer { get; }
The timeline container.
Gets or sets the timeline end date.
public DateTime TimelineEnd { get; set; }
The timeline end.
Gets the timeline items.
public ObservableCollection<GanttViewTimelineDataItem> TimelineItems { get; }
The timeline items.
Gets or sets the type of the timeline range.
public TimeRange TimelineRange { get; set; }
The timeline range.
Gets the timeline scroller.
public GanttViewTimelineScroller TimelineScroller { get; }
The timeline scroller.
Gets or sets the timeline start date.
public DateTime TimelineStart { get; set; }
The timeline start.
Gets the timeline today indicator element.
public GanttViewTimelineTodayIndicatorElement TimelineTodayIndicatorElement { get; }
The timeline today indicator element.
Gets the today indicator element.
public GanttViewTodayIndicatorElement TodayIndicatorElement { get; }
The today indicator element.
Methods
Arranges the content and child elements within the final allocated space, positioning text, images, and child elements.
Calculates the finish to finish lines for the given link and optional point when a new link is being created.
protected virtual void CalculateFinishToFinishLines(GanttViewLinkDataItem link, Point? point)
The link.
pointPoint?The position of the mouse (if creating or editing a link).
Calculates the finish to start lines for the given link and optional point when a new link is being created.
protected virtual void CalculateFinishToStartLines(GanttViewLinkDataItem link, Point? point)
The link.
pointPoint?The position of the mouse (if creating or editing a link).
Calculates the link lines for all links.
protected virtual void CalculateLinkLines()
Calculates the link lines for all links connected to the given item.
protected virtual void CalculateLinkLines(GanttViewDataItem item)
The item.
Calculates the link lines for the given link and optional point when a new link is being created.
public virtual void CalculateLinkLines(GanttViewLinkDataItem link, Point? point)
The link.
pointPoint?The position of the mouse (if creating or editing a link).
Calculates the start to finish lines for the given link and optional point when a new link is being created.
protected virtual void CalculateStartToFinishLines(GanttViewLinkDataItem link, Point? point)
The link.
pointPoint?The position of the mouse (if creating or editing a link).
Calculates the start to start lines for the given link and optional point when a new link is being created.
protected virtual void CalculateStartToStartLines(GanttViewLinkDataItem link, Point? point)
The link.
pointPoint?The position of the mouse (if creating or editing a link).
Creates the child elements.
protected override void CreateChildElements()
Overrides:
Disposes the managed resources.
protected override void DisposeManagedResources()
Overrides:
Called when the DPI scale factor changes. Updates the scale factor and notifies child elements.
public override void DpiScaleChanged(SizeF scaleFactor)
The new DPI scale factor.
Overrides:
Draws the link lines.
protected virtual void DrawLinkLines(IGraphics graphics)
The graphics.
Returns a rectangle representing the coordinates where an object should be positioned or drawn for the given item and time frame.
public virtual RectangleF GetDrawRectangle(GanttViewDataItem item, DateTime start, DateTime end, bool addHScrollOffset, bool addVScrollOffset, bool addHeaderHeight)
The item.
startDateTimeThe start.
endDateTimeThe end.
addHScrollOffsetboolif set to true the horizontal scroll bar offset is taken into account.
if set to true the vertical scroll bar offset is taken into account.
if set to true the header header height is added to the y coordinate of the result.
Returns a rectangle representing the coordinates where an object should be positioned or drawn for the given item and time frame.
public virtual RectangleF GetDrawRectangle(GanttViewDataItem item, DateTime start, DateTime end, bool addScrollOffset)
The item.
startDateTimeThe start.
endDateTimeThe end.
addScrollOffsetboolif set to true the horizontal scroll bar offset is taken into account.
Returns a rectangle representing the coordinates where an object should be positioned or drawn for the given item and time frame.
public virtual RectangleF GetDrawRectangle(GanttViewDataItem item, DateTime start, DateTime end)
The item.
startDateTimeThe start.
endDateTimeThe end.
Returns:Returns a rectangle with zero width representing the coordinates where an object should be positioned or drawn for the given item and time.
public virtual RectangleF GetDrawRectangle(GanttViewDataItem item, DateTime datetime)
The item .
datetimeDateTimeThe datetime.
Returns:Gets the link item in the given position if such exists otherwise returns null;
public virtual GanttViewLinkDataItem GetLink(Point location)
The location in control coordinates where to search for a link.
Returns:Initializes the fields.
protected override void InitializeFields()
Overrides:
Returns a value indicating whether two lines intersect.
Measures the desired size of the element by calculating the space needed for content, padding, and borders.
Raises the standard .NET PropertyChanged event.
protected override void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Overrides:
Called when the OnePixelTime property is assigned a new value.
protected virtual void OnOnePixelTimeChanged(bool zoomin)
Indicated whether the change results in a zoom-in or zoom-out.
Paints the children.
protected override void PaintChildren(IGraphics graphics, Rectangle clipRectange, float angle, SizeF scale, bool useRelativeTransformation)
The graphics.
clipRectangeRectangleThe clip rectangle.
anglefloatThe angle.
scaleSizeFThe scale.
useRelativeTransformationboolif set to true [use relative transformation].
Overrides:
Populates the flat tasks collection which is used for positioning links.
protected virtual void PopulateFlatTasksCollection()
Determines whether the given link should be drawn.
protected virtual bool ShouldDrawLink(GanttViewLinkDataItem link, Point[] linkLines)
The link.
linkLinesPoint[]The link lines.
Returns:Synchronizes the item elements.
protected virtual void SynchronizeItemElements()
Updates the specified update action.
public void Update(RadGanttViewElement.UpdateActions updateAction)
The update action.
Updates the inner state.
protected virtual void UpdateInnerState()
Updates the scrollers.
protected virtual void UpdateScrollers(RadGanttViewElement.UpdateActions updateAction)
The update action.
Updates the text view scroller when the scroll bar is moved.
protected virtual void UpdateTextViewScroller()
Updates the timeline zoom.
public virtual void UpdateTimelineZoom()