Class GanttViewGraphicalViewElement
Represents the element which displays the graphical part of a RadGanttView.
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 GanttViewGraphicalViewElement class.
Declaration
public GanttViewGraphicalViewElement(RadGanttViewElement ganttView)
Parameters
RadGanttViewElement
ganttView
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.Boolean
|
HorizontalScrollBarElement
Gets the horizontal scroll bar element.
Declaration
public RadScrollBarElement HorizontalScrollBarElement { get; }
Property Value
RadScrollBarElement
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.Boolean
|
LinksColor
Gets or sets the color of the links.
Declaration
public Color LinksColor { get; set; }
Property Value
System.Drawing.Color
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.Drawing.Size
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.Int32
|
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.Int32
|
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
GanttViewLinkDataItem
The new link. |
OnePixelTime
Gets or sets how much time a single pixel represents.
Declaration
public TimeSpan OnePixelTime { get; set; }
Property Value
System.TimeSpan
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.Boolean
|
ShowTodayIndicator
Gets or sets a value indicating whether to show the today indicator.
Declaration
public bool ShowTodayIndicator { get; set; }
Property Value
System.Boolean
|
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
BaseGanttViewTimelineBehavior
|
TimelineContainer
Gets the timeline container.
Declaration
public GanttViewTimelineContainer TimelineContainer { get; }
Property Value
GanttViewTimelineContainer
The timeline container. |
TimelineEnd
Gets or sets the timeline end date.
Declaration
public DateTime TimelineEnd { get; set; }
Property Value
System.DateTime
The timeline end. |
TimelineItems
Gets the timeline items.
Declaration
public ObservableCollection<GanttViewTimelineDataItem> TimelineItems { get; }
Property Value
ObservableCollection<GanttViewTimelineDataItem>
The timeline items. |
TimelineRange
Gets or sets the type of the timeline range.
Declaration
public TimeRange TimelineRange { get; set; }
Property Value
TimeRange
The timeline range. |
TimelineScroller
Gets the timeline scroller.
Declaration
public GanttViewTimelineScroller TimelineScroller { get; }
Property Value
GanttViewTimelineScroller
The timeline scroller. |
TimelineStart
Gets or sets the timeline start date.
Declaration
public DateTime TimelineStart { get; set; }
Property Value
System.DateTime
The timeline start. |
TimelineTodayIndicatorElement
Gets the timeline today indicator element.
Declaration
public GanttViewTimelineTodayIndicatorElement TimelineTodayIndicatorElement { get; }
Property Value
GanttViewTimelineTodayIndicatorElement
The timeline today indicator element. |
TodayIndicatorElement
Gets the today indicator element.
Declaration
public GanttViewTodayIndicatorElement TodayIndicatorElement { get; }
Property Value
GanttViewTodayIndicatorElement
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.Collections.Generic.List<System.Drawing.Point>
lines
The lines. |
Returns
System.Drawing.Point[]
|
ArrangeOverride(SizeF)
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
|
Returns
System.Drawing.SizeF
|
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
GanttViewLinkDataItem
link
The link. |
System.Nullable<System.Drawing.Point>
point
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
GanttViewLinkDataItem
link
The link. |
System.Nullable<System.Drawing.Point>
point
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
GanttViewDataItem
item
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
GanttViewLinkDataItem
link
The link. |
System.Nullable<System.Drawing.Point>
point
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
GanttViewLinkDataItem
link
The link. |
System.Nullable<System.Drawing.Point>
point
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
GanttViewLinkDataItem
link
The link. |
System.Nullable<System.Drawing.Point>
point
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.Drawing.SizeF
scaleFactor
|
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
GanttViewDataItem
item
The item . |
System.DateTime
datetime
The datetime. |
Returns
System.Drawing.RectangleF
|
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
GanttViewDataItem
item
The item. |
System.DateTime
start
The start. |
System.DateTime
end
The end. |
Returns
System.Drawing.RectangleF
|
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
GanttViewDataItem
item
The item. |
System.DateTime
start
The start. |
System.DateTime
end
The end. |
System.Boolean
addScrollOffset
if set to |
Returns
System.Drawing.RectangleF
|
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
GanttViewDataItem
item
The item. |
System.DateTime
start
The start. |
System.DateTime
end
The end. |
System.Boolean
addHScrollOffset
if set to |
System.Boolean
addVScrollOffset
if set to |
System.Boolean
addHeaderHeight
if set to |
Returns
System.Drawing.RectangleF
|
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.Drawing.Point
location
The location in control coordinates where to search for a link. |
Returns
GanttViewLinkDataItem
|
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.Drawing.Point
l1p1
The begin point of the first line. |
System.Drawing.Point
l1p2
The end point of the first line |
System.Drawing.Point
l2p1
The begin point of the second line. |
System.Drawing.Point
l2p2
The end point of the second line. |
Returns
System.Boolean
|
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.Drawing.Point
p1
The begin point of the line. |
System.Drawing.Point
p2
The end point of the line. |
System.Drawing.Rectangle
r
The rectangle. |
Returns
System.Boolean
|
MeasureOverride(SizeF)
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
|
Returns
System.Drawing.SizeF
|
Overrides
OnNotifyPropertyChanged(PropertyChangedEventArgs)
Raises the standard .NET PropertyChanged event.
Declaration
protected override void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters
System.ComponentModel.PropertyChangedEventArgs
e
|
Overrides
OnOnePixelTimeChanged(Boolean)
Called when the OnePixelTime property is assigned a new value.
Declaration
protected virtual void OnOnePixelTimeChanged(bool zoomin)
Parameters
System.Boolean
zoomin
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.Drawing.Rectangle
clipRectange
The clip rectangle. |
System.Single
angle
The angle. |
System.Drawing.SizeF
scale
The scale. |
System.Boolean
useRelativeTransformation
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.DateTime
dateTime
The date to scroll to. |
Returns
System.Boolean
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
GanttViewLinkDataItem
link
The link. |
System.Drawing.Point[]
linkLines
The link lines. |
Returns
System.Boolean
|
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
RadGanttViewElement.UpdateActions
updateAction
The update action. |
UpdateInnerState()
Updates the inner state.
Declaration
protected virtual void UpdateInnerState()
UpdateOnMeasure(SizeF)
Declaration
protected override bool UpdateOnMeasure(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
|
Returns
System.Boolean
|
Overrides
UpdateScrollers(RadGanttViewElement.UpdateActions)
Updates the scrollers.
Declaration
protected virtual void UpdateScrollers(RadGanttViewElement.UpdateActions updateAction)
Parameters
RadGanttViewElement.UpdateActions
updateAction
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()