Class RadTaskCardElement
Represents a visual card element within a task board that displays task information including title, description, tags, users, subtasks, and accent settings with drag-and-drop support.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadTaskCardElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
RadTaskCardElement()
Declaration
public RadTaskCardElement()
Fields
MinimumHeightProperty
SelectedProperty
Properties
AccentSettings
Gets the accent settings that control visual highlighting and color customization for the task card.
Declaration
public AccentSettingsImpl AccentSettings { get; }
Property Value
|
AccentSettingsImpl
|
DescriptionElement
Gets the visual element that displays the task card's description text, images, and SVG content.
Declaration
public LightVisualElement DescriptionElement { get; }
Property Value
|
LightVisualElement
|
DescriptionImage
Gets or sets the image displayed within the description area to provide visual context for the task.
Declaration
public Image DescriptionImage { get; set; }
Property Value
|
System.Drawing.Image
|
DescriptionImageLayout
Gets or sets the layout method for positioning the description image within its container area.
Declaration
public ImageLayout DescriptionImageLayout { get; set; }
Property Value
|
System.Windows.Forms.ImageLayout
|
DescriptionSvgImage
Gets or sets the SVG image displayed within the description area for scalable vector graphics support.
Declaration
public RadSvgImage DescriptionSvgImage { get; set; }
Property Value
|
RadSvgImage
|
DescriptionText
Gets or sets the descriptive text content that provides detailed information about the task.
Declaration
public string DescriptionText { get; set; }
Property Value
|
System.String
|
ElementsCollections
Gets the dictionary containing element collections for different content alignment positions, allowing custom RadItem placement in panels.
Declaration
public Dictionary<ContentAlignment, RadItemOwnerCollection> ElementsCollections { get; }
Property Value
|
System.Collections.Generic.Dictionary<System.Drawing.ContentAlignment, RadItemOwnerCollection>
|
MinimumHeight
Gets or sets the minimum height constraint for the task card in pixels. Setting this value unbinds the property from the DefaultTaskCardMinimumHeight property. Use ResetMinimumHeight() to restore binding.
Declaration
public int MinimumHeight { get; set; }
Property Value
|
System.Int32
|
Panels
Gets the dictionary containing layout panels for different content alignment positions within the task card.
Declaration
public Dictionary<ContentAlignment, StackLayoutElementLite> Panels { get; }
Property Value
|
System.Collections.Generic.Dictionary<System.Drawing.ContentAlignment, StackLayoutElementLite>
|
Selected
Gets or sets a value indicating whether the task card is currently selected within the task board.
Declaration
public bool Selected { get; set; }
Property Value
|
System.Boolean
|
SubTasks
Gets the collection of SubTask objects that represent individual subtasks within this task card.
Declaration
public ObservableCollection<SubTask> SubTasks { get; }
Property Value
|
System.Collections.ObjectModel.ObservableCollection<SubTask>
|
SubTasksElement
Gets the visual element that displays the completion status and count of subtasks within the task card.
Declaration
public LightVisualElement SubTasksElement { get; }
Property Value
|
LightVisualElement
|
SubTasksStringFormat
Gets or sets the string format used to display subtask completion status as "completed/total" within the task card. Default format is "{0}/{1}" where {0} represents completed subtasks and {1} represents total subtasks.
Declaration
public string SubTasksStringFormat { get; set; }
Property Value
|
System.String
|
SubTasksToolTipStringFormat
Gets or sets the string format used for subtask completion tooltip text displayed when hovering over the subtask indicator. Default format is "{0} out of {1} subtasks completed." where {0} represents completed subtasks and {1} represents total subtasks.
Declaration
public string SubTasksToolTipStringFormat { get; set; }
Property Value
|
System.String
|
TagElements
Gets the collection containing visual tag elements displayed on the left side of the task card.
Declaration
[RadEditItemsAction]
public RadItemOwnerCollection TagElements { get; }
Property Value
|
RadItemOwnerCollection
|
Tags
Gets the collection of unique TagInfo objects representing categorization tags associated with this task card.
Declaration
public ObservableHashSet<TagInfo> Tags { get; }
Property Value
|
ObservableHashSet<TagInfo>
|
TaskBoardElement
Gets the parent RadTaskBoardElement that contains this card, automatically locating it in the element hierarchy if not cached.
Declaration
protected RadTaskBoardElement TaskBoardElement { get; }
Property Value
|
RadTaskBoardElement
|
Text
Gets or sets the complete text content of the task card including title and description for data binding purposes.
Declaration
public override string Text { get; set; }
Property Value
|
System.String
|
Overrides
TitleElement
Gets the visual element that displays the task card's title text and styling.
Declaration
public LightVisualElement TitleElement { get; }
Property Value
|
LightVisualElement
|
TitleText
Gets or sets the title text displayed prominently at the top of the task card.
Declaration
public string TitleText { get; set; }
Property Value
|
System.String
|
UserElements
Gets the collection containing visual user elements displayed on the right side of the task card.
Declaration
public RadItemOwnerCollection UserElements { get; }
Property Value
|
RadItemOwnerCollection
|
Users
Gets the collection of UserInfo objects representing users assigned to or associated with this task card.
Declaration
public ObservableCollection<UserInfo> Users { get; }
Property Value
|
System.Collections.ObjectModel.ObservableCollection<UserInfo>
|
Methods
ArrangeOverride(SizeF)
Arranges the task card's layout panels within the final allocated space, positioning content according to alignment settings.
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
|
System.Drawing.SizeF
finalSize
The final size allocated for the task card element. |
Returns
|
System.Drawing.SizeF
The actual size used by the task card element. |
Overrides
CreateChildElements()
Creates and configures all child visual elements including layout panels, title, description, tags, users, and subtasks elements.
Declaration
protected override void CreateChildElements()
Overrides
CreateDescriptionElement()
Creates and returns the description element for the task card. Override this method to provide a custom description element implementation.
Declaration
protected virtual LightVisualElement CreateDescriptionElement()
Returns
|
LightVisualElement
A new LightVisualElement configured as the description element. |
CreateSubtasksElement()
Creates and returns the subtasks element for the task card. Override this method to provide a custom subtasks element implementation.
Declaration
protected virtual LightVisualElement CreateSubtasksElement()
Returns
|
LightVisualElement
A new LightVisualElement configured as the subtasks element. |
CreateTitleElement()
Creates and returns the title element for the task card. Override this method to provide a custom title element implementation.
Declaration
protected virtual LightVisualElement CreateTitleElement()
Returns
|
LightVisualElement
A new LightVisualElement configured as the title element. |
DisposeManagedResources()
Releases managed resources by unsubscribing from collection change events for users, tags, and subtasks collections.
Declaration
protected override void DisposeManagedResources()
Overrides
InitializeFields()
Initializes the default field values, event handlers, and visual properties for the task card element including drag-drop and selection behavior.
Declaration
protected override void InitializeFields()
Overrides
MeasureOverride(SizeF)
Measures the desired size of the task card element, ensuring it meets the minimum height requirement while accommodating content.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
|
System.Drawing.SizeF
availableSize
The available space for layout measurement. |
Returns
|
System.Drawing.SizeF
The desired size of the task card element. |
Overrides
OnBubbleEvent(RadElement, RoutedEventArgs)
Handles bubbled events from child elements, specifically managing mouse up events to complete drag-and-drop operations.
Declaration
protected override void OnBubbleEvent(RadElement sender, RoutedEventArgs args)
Parameters
|
RadElement
sender
The element that originally raised the event. |
|
RoutedEventArgs
args
The routed event arguments containing event data and cancellation information. |
Overrides
OnDeselect()
Called when the task card becomes deselected, updating the Selected property to reflect the new state.
Declaration
protected override void OnDeselect()
Overrides
OnMouseDown(MouseEventArgs)
Handles mouse down events, selecting the task card and initiating drag-and-drop operations for left-click interactions.
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
|
System.Windows.Forms.MouseEventArgs
e
The mouse event arguments containing button and position information. |
Overrides
OnMouseMove(MouseEventArgs)
Handles mouse move events, managing drag-and-drop threshold detection and scroll service activation during card dragging.
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
|
System.Windows.Forms.MouseEventArgs
e
The mouse event arguments containing button state and position information. |
Overrides
OnSelect()
Called when the task card becomes selected, updating the Selected property to reflect the new state.
Declaration
protected override void OnSelect()
Overrides
OnTagsCollectionChanged(Object, NotifyCollectionChangedEventArgs)
Handles changes to the Tags collection, updating the visual representation and managing tag registration.
Declaration
protected virtual void OnTagsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters
|
System.Object
sender
The object that raised the collection changed event. |
|
System.Collections.Specialized.NotifyCollectionChangedEventArgs
e
The event arguments containing details about the collection modification. |
OnUsersCollectionChanged(Object, NotifyCollectionChangedEventArgs)
Handles changes to the Users collection, updating the visual representation of assigned users.
Declaration
protected virtual void OnUsersCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters
|
System.Object
sender
The object that raised the collection changed event. |
|
System.Collections.Specialized.NotifyCollectionChangedEventArgs
e
The event arguments containing details about the collection modification. |
PaintElement(IGraphics, Single, SizeF)
Renders the task card element and applies accent visualization based on the configured AccentSettings.
Declaration
protected override void PaintElement(IGraphics graphics, float angle, SizeF scale)
Parameters
|
IGraphics
graphics
The graphics context used for rendering operations. |
|
System.Single
angle
The rotation angle for the element rendering. |
|
System.Drawing.SizeF
scale
The scaling factor applied to the element rendering. |
Overrides
ResetMinimumHeight()
Resets the MinimumHeight property to its default value and restores binding to the task board's default setting.
Declaration
public void ResetMinimumHeight()
SetSubTasks()
Updates the subtask display element with current completion status and tooltip information based on the subtask collection.
Declaration
protected virtual void SetSubTasks()