Class GanttViewGraphicalViewElement
Represents the element which displays the graphical part of a Rad
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class GanttViewGraphicalViewElement : GanttViewBaseViewElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
GanttViewGraphicalViewElement(RadGanttViewElement)
Initializes a new instance of the Gantt
Declaration
public GanttViewGraphicalViewElement(RadGanttViewElement ganttView)
Parameters
Rad The gantt view. |
Fields
LinksColorProperty
LinksHandlesSizeProperty
LinksSelectionClickTresholdProperty
LinksSelectionColorSpreadProperty
ShowTimelineTodayIndicatorProperty
ShowTodayIndicatorProperty
Properties
AutomaticTimelineTimeRange
Gets or sets a value indicating whether the TimeRange of the gantt view will be handled by the control.
Declaration
public bool AutomaticTimelineTimeRange { get; set; }
Property Value
System.
|
HorizontalScrollBarElement
Gets the horizontal scroll bar element.
Declaration
public RadScrollBarElement HorizontalScrollBarElement { get; }
Property Value
Rad The horizontal scroll bar element. |
IsCreatingLink
Gets or sets a value indicating whether a new link is being created.
Declaration
protected bool IsCreatingLink { get; set; }
Property Value
System.
|
LinksColor
Gets or sets the color of the links.
Declaration
public Color LinksColor { get; set; }
Property Value
System. The color of the links. |
LinksHandlesSize
Gets or sets the size of the links handles.
Declaration
[RadPropertyDefaultValue("LinksHandlesSize", typeof(GanttViewGraphicalViewElement))]
public Size LinksHandlesSize { get; set; }
Property Value
System. The size of the links handles. |
LinksSelectionClickTreshold
Gets or sets how many pixels along the link of a link will trigger selection.
Declaration
public int LinksSelectionClickTreshold { get; set; }
Property Value
System.
|
LinksSelectionColorSpread
Gets or sets how wide the selection highlight color will be painted along a selected link.
Declaration
public int LinksSelectionColorSpread { get; set; }
Property Value
System.
|
NewLink
Gets or sets the new link instance. This is not null when a new link is being created.
Declaration
protected GanttViewLinkDataItem NewLink { get; set; }
Property Value
Gantt The new link. |
OnePixelTime
Gets or sets how much time a single pixel represents.
Declaration
public TimeSpan OnePixelTime { get; set; }
Property Value
System. The one pixel time. |
ShowTimelineTodayIndicator
Gets or sets a value indicating whether to show the timeline today indicator.
Declaration
public bool ShowTimelineTodayIndicator { get; set; }
Property Value
System.
|
ShowTodayIndicator
Gets or sets a value indicating whether to show the today indicator.
Declaration
public bool ShowTodayIndicator { get; set; }
Property Value
System.
|
TimelineBehavior
Gets or sets the behavior which handles the perations related to the gantt view timeline items.
Declaration
public BaseGanttViewTimelineBehavior TimelineBehavior { get; set; }
Property Value
TimelineContainer
Gets the timeline container.
Declaration
public GanttViewTimelineContainer TimelineContainer { get; }
Property Value
Gantt The timeline container. |
TimelineEnd
Gets or sets the timeline end date.
Declaration
public DateTime TimelineEnd { get; set; }
Property Value
System. The timeline end. |
TimelineItems
Gets the timeline items.
Declaration
public ObservableCollection<GanttViewTimelineDataItem> TimelineItems { get; }
Property Value
Observable The timeline items. |
TimelineRange
Gets or sets the type of the timeline range.
Declaration
public TimeRange TimelineRange { get; set; }
Property Value
Time The timeline range. |
TimelineScroller
Gets the timeline scroller.
Declaration
public GanttViewTimelineScroller TimelineScroller { get; }
Property Value
Gantt The timeline scroller. |
TimelineStart
Gets or sets the timeline start date.
Declaration
public DateTime TimelineStart { get; set; }
Property Value
System. The timeline start. |
TimelineTodayIndicatorElement
Gets the timeline today indicator element.
Declaration
public GanttViewTimelineTodayIndicatorElement TimelineTodayIndicatorElement { get; }
Property Value
Gantt The timeline today indicator element. |
TodayIndicatorElement
Gets the today indicator element.
Declaration
public GanttViewTodayIndicatorElement TodayIndicatorElement { get; }
Property Value
Gantt The today indicator element. |
Methods
ApplyOffset(List<Point>)
Applies the scroll offset to the link lines.
Declaration
protected virtual Point[] ApplyOffset(List<Point> lines)
Parameters
System. The lines. |
Returns
System.
|
ArrangeOverride(SizeF)
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.
|
Returns
System.
|
Overrides
CalculateFinishToFinishLines(GanttViewLinkDataItem, Nullable<Point>)
Calculates the finish to finish lines for the given link and optional point when a new link is being created.
Declaration
protected virtual void CalculateFinishToFinishLines(GanttViewLinkDataItem link, Point? point)
Parameters
Gantt The link. |
System. The position of the mouse (if creating or editing a link). |
CalculateFinishToStartLines(GanttViewLinkDataItem, Nullable<Point>)
Calculates the finish to start lines for the given link and optional point when a new link is being created.
Declaration
protected virtual void CalculateFinishToStartLines(GanttViewLinkDataItem link, Point? point)
Parameters
Gantt The link. |
System. The position of the mouse (if creating or editing a link). |
CalculateLinkLines()
Calculates the link lines for all links.
Declaration
protected virtual void CalculateLinkLines()
CalculateLinkLines(GanttViewDataItem)
Calculates the link lines for all links connected to the given item.
Declaration
protected virtual void CalculateLinkLines(GanttViewDataItem item)
Parameters
Gantt The item. |
CalculateLinkLines(GanttViewLinkDataItem, Nullable<Point>)
Calculates the link lines for the given link and optional point when a new link is being created.
Declaration
public virtual void CalculateLinkLines(GanttViewLinkDataItem link, Point? point)
Parameters
Gantt The link. |
System. The position of the mouse (if creating or editing a link). |
CalculateStartToFinishLines(GanttViewLinkDataItem, Nullable<Point>)
Calculates the start to finish lines for the given link and optional point when a new link is being created.
Declaration
protected virtual void CalculateStartToFinishLines(GanttViewLinkDataItem link, Point? point)
Parameters
Gantt The link. |
System. The position of the mouse (if creating or editing a link). |
CalculateStartToStartLines(GanttViewLinkDataItem, Nullable<Point>)
Calculates the start to start lines for the given link and optional point when a new link is being created.
Declaration
protected virtual void CalculateStartToStartLines(GanttViewLinkDataItem link, Point? point)
Parameters
Gantt The link. |
System. The position of the mouse (if creating or editing a link). |
CreateChildElements()
Creates the child elements.
Declaration
protected override void CreateChildElements()
Overrides
DisposeManagedResources()
Disposes the managed resources.
Declaration
protected override void DisposeManagedResources()
Overrides
DpiScaleChanged(SizeF)
Declaration
public override void DpiScaleChanged(SizeF scaleFactor)
Parameters
System.
|
Overrides
DrawLinkLines(IGraphics)
Draws the link lines.
Declaration
protected virtual void DrawLinkLines(IGraphics graphics)
Parameters
IGraphics
graphics
The graphics. |
GetDrawRectangle(GanttViewDataItem, DateTime)
Returns a rectangle with zero width representing the coordinates where an object should be positioned or drawn for the given item and time.
Declaration
public virtual RectangleF GetDrawRectangle(GanttViewDataItem item, DateTime datetime)
Parameters
Gantt The item . |
System. The datetime. |
Returns
System.
|
GetDrawRectangle(GanttViewDataItem, DateTime, DateTime)
Returns a rectangle representing the coordinates where an object should be positioned or drawn for the given item and time frame.
Declaration
public virtual RectangleF GetDrawRectangle(GanttViewDataItem item, DateTime start, DateTime end)
Parameters
Gantt The item. |
System. The start. |
System. The end. |
Returns
System.
|
GetDrawRectangle(GanttViewDataItem, DateTime, DateTime, Boolean)
Returns a rectangle representing the coordinates where an object should be positioned or drawn for the given item and time frame.
Declaration
public virtual RectangleF GetDrawRectangle(GanttViewDataItem item, DateTime start, DateTime end, bool addScrollOffset)
Parameters
Gantt The item. |
System. The start. |
System. The end. |
System. if set to |
Returns
System.
|
GetDrawRectangle(GanttViewDataItem, DateTime, DateTime, Boolean, Boolean, Boolean)
Returns a rectangle representing the coordinates where an object should be positioned or drawn for the given item and time frame.
Declaration
public virtual RectangleF GetDrawRectangle(GanttViewDataItem item, DateTime start, DateTime end, bool addHScrollOffset, bool addVScrollOffset, bool addHeaderHeight)
Parameters
Gantt The item. |
System. The start. |
System. The end. |
System. if set to |
System. if set to |
System. if set to |
Returns
System.
|
GetLink(Point)
Gets the link item in the given position if such exists otherwise returns null;
Declaration
public virtual GanttViewLinkDataItem GetLink(Point location)
Parameters
System. The location in control coordinates where to search for a link. |
Returns
InitializeFields()
Initializes the fields.
Declaration
protected override void InitializeFields()
Overrides
LineIntersectsLine(Point, Point, Point, Point)
Returns a value indicating whether two lines intersect.
Declaration
protected virtual bool LineIntersectsLine(Point l1p1, Point l1p2, Point l2p1, Point l2p2)
Parameters
System. The begin point of the first line. |
System. The end point of the first line |
System. The begin point of the second line. |
System. The end point of the second line. |
Returns
System.
|
LineIntersectsRect(Point, Point, Rectangle)
Returns a value indicating whether a line represented with two points intersects the given rectangle.
Declaration
protected virtual bool LineIntersectsRect(Point p1, Point p2, Rectangle r)
Parameters
System. The begin point of the line. |
System. The end point of the line. |
System. The rectangle. |
Returns
System.
|
MeasureOverride(SizeF)
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.
|
Returns
System.
|
Overrides
OnNotifyPropertyChanged(PropertyChangedEventArgs)
Raises the standard .NET PropertyChanged event.
Declaration
protected override void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters
System.
|
Overrides
OnOnePixelTimeChanged(Boolean)
Called when the OnePixelTime property is assigned a new value.
Declaration
protected virtual void OnOnePixelTimeChanged(bool zoomin)
Parameters
System. Indicated whether the change results in a zoom-in or zoom-out. |
PaintChildren(IGraphics, Rectangle, Single, SizeF, Boolean)
Paints the children.
Declaration
protected override void PaintChildren(IGraphics graphics, Rectangle clipRectange, float angle, SizeF scale, bool useRelativeTransformation)
Parameters
IGraphics
graphics
The graphics. |
System. The clip rectangle. |
System. The angle. |
System. The scale. |
System. if set to |
Overrides
PopulateFlatTasksCollection()
Populates the flat tasks collection which is used for positioning links.
Declaration
protected virtual void PopulateFlatTasksCollection()
ScrollTo(DateTime)
Scrolls the graphical view to the given date. The date is placed in the middle of the view.
Declaration
public virtual bool ScrollTo(DateTime dateTime)
Parameters
System. The date to scroll to. |
Returns
System. true if the scroll operation was successful otherwise false. |
ShouldDrawLink(GanttViewLinkDataItem, Point[])
Determines whether the given link should be drawn.
Declaration
protected virtual bool ShouldDrawLink(GanttViewLinkDataItem link, Point[] linkLines)
Parameters
Gantt The link. |
System. The link lines. |
Returns
System.
|
SynchronizeItemElements()
Synchronizes the item elements.
Declaration
protected virtual void SynchronizeItemElements()
Update(RadGanttViewElement.UpdateActions)
Updates the specified update action.
Declaration
public void Update(RadGanttViewElement.UpdateActions updateAction)
Parameters
Rad The update action. |
UpdateInnerState()
Updates the inner state.
Declaration
protected virtual void UpdateInnerState()
UpdateOnMeasure(SizeF)
Declaration
protected override bool UpdateOnMeasure(SizeF availableSize)
Parameters
System.
|
Returns
System.
|
Overrides
UpdateScrollers(RadGanttViewElement.UpdateActions)
Updates the scrollers.
Declaration
protected virtual void UpdateScrollers(RadGanttViewElement.UpdateActions updateAction)
Parameters
Rad The update action. |
UpdateTextViewScroller()
Updates the text view scroller when the scroll bar is moved.
Declaration
protected virtual void UpdateTextViewScroller()
UpdateTimelineZoom()
Updates the timeline zoom.
Declaration
public virtual void UpdateTimelineZoom()