ClassRadTaskCardElement
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.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadTaskCardElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadTaskCardElement
Implements:
Inherited Members
Constructors
RadTaskCardElement()
Declaration
public RadTaskCardElement()
Fields
MinimumHeightProperty
Declaration
public static RadProperty MinimumHeightProperty
Field Value
Properties
AccentSettings
Gets the accent settings that control visual highlighting and color customization for the task card.
Declaration
[Browsable(true)]
public AccentSettingsImpl AccentSettings { get; }
Property Value
DescriptionElement
Gets the visual element that displays the task card's description text, images, and SVG content.
Declaration
[Browsable(false)]
public LightVisualElement DescriptionElement { get; }
Property Value
DescriptionImage
Gets or sets the image displayed within the description area to provide visual context for the task.
DescriptionImageLayout
Gets or sets the layout method for positioning the description image within its container area.
Declaration
public ImageLayout DescriptionImageLayout { get; set; }
Property Value
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
DescriptionText
Gets or sets the descriptive text content that provides detailed information about the task.
ElementsCollections
Gets the dictionary containing element collections for different content alignment positions, allowing custom RadItem placement in panels.
Declaration
[Browsable(false)]
public Dictionary<ContentAlignment, RadItemOwnerCollection> ElementsCollections { get; }
Property Value
Dictionary<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.
Panels
Gets the dictionary containing layout panels for different content alignment positions within the task card.
Declaration
[Browsable(false)]
public Dictionary<ContentAlignment, StackLayoutElementLite> Panels { get; }
Property Value
Dictionary<ContentAlignment, StackLayoutElementLite>
Selected
Gets or sets a value indicating whether the task card is currently selected within the task board.
SubTasks
Gets the collection of SubTask objects that represent individual subtasks within this task card.
Declaration
[Browsable(true)]
public ObservableCollection<SubTask> SubTasks { get; }
Property Value
SubTasksElement
Gets the visual element that displays the completion status and count of subtasks within the task card.
Declaration
[Browsable(false)]
public LightVisualElement SubTasksElement { get; }
Property Value
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
[Browsable(true)]
public string SubTasksStringFormat { get; set; }
Property Value
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
[Browsable(true)]
public string SubTasksToolTipStringFormat { get; set; }
Property Value
TagElements
Gets the collection containing visual tag elements displayed on the left side of the task card.
Declaration
[Browsable(false)]
[RadEditItemsAction]
public RadItemOwnerCollection TagElements { get; }
Property Value
Tags
Gets the collection of unique TagInfo objects representing categorization tags associated with this task card.
Declaration
[Browsable(true)]
public ObservableHashSet<TagInfo> Tags { get; }
Property Value
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
TitleElement
Gets the visual element that displays the task card's title text and styling.
Declaration
[Browsable(false)]
public LightVisualElement TitleElement { get; }
Property Value
TitleText
Gets or sets the title text displayed prominently at the top of the task card.
UserElements
Gets the collection containing visual user elements displayed on the right side of the task card.
Declaration
[Browsable(false)]
public RadItemOwnerCollection UserElements { get; }
Property Value
Methods
ArrangeOverride(SizeF)
Arranges the task card's layout panels within the final allocated space, positioning content according to alignment settings.
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
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
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
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.
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
sender
The element that originally raised the event.
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
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
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
sender
The object that raised the collection changed event.
e
NotifyCollectionChangedEventArgs
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
sender
The object that raised the collection changed event.
e
NotifyCollectionChangedEventArgs
The event arguments containing details about the collection modification.
PaintElement(IGraphics, float, 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
graphics
The graphics context used for rendering operations.
angle
The rotation angle for the element rendering.
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()