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.
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
public RadTaskCardElement()
Fields
public static RadProperty MinimumHeightProperty
public static RadProperty SelectedProperty
Properties
Gets the accent settings that control visual highlighting and color customization for the task card.
[Browsable(true)]
public AccentSettingsImpl AccentSettings { get; }
Gets the visual element that displays the task card's description text, images, and SVG content.
[Browsable(false)]
public LightVisualElement DescriptionElement { get; }
Gets or sets the image displayed within the description area to provide visual context for the task.
public Image DescriptionImage { get; set; }
Gets or sets the layout method for positioning the description image within its container area.
public ImageLayout DescriptionImageLayout { get; set; }
Gets or sets the SVG image displayed within the description area for scalable vector graphics support.
public RadSvgImage DescriptionSvgImage { get; set; }
Gets or sets the descriptive text content that provides detailed information about the task.
public string DescriptionText { get; set; }
Gets the dictionary containing element collections for different content alignment positions, allowing custom RadItem placement in panels.
[Browsable(false)]
public Dictionary<ContentAlignment, RadItemOwnerCollection> ElementsCollections { get; }
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.
public int MinimumHeight { get; set; }
Panels
Dictionary<ContentAlignment, StackLayoutElementLite>
Gets the dictionary containing layout panels for different content alignment positions within the task card.
[Browsable(false)]
public Dictionary<ContentAlignment, StackLayoutElementLite> Panels { get; }
Gets or sets a value indicating whether the task card is currently selected within the task board.
public bool Selected { get; set; }
Gets the collection of SubTask objects that represent individual subtasks within this task card.
[Browsable(true)]
public ObservableCollection<SubTask> SubTasks { get; }
Gets the visual element that displays the completion status and count of subtasks within the task card.
[Browsable(false)]
public LightVisualElement SubTasksElement { get; }
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.
[Browsable(true)]
public string SubTasksStringFormat { get; set; }
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.
[Browsable(true)]
public string SubTasksToolTipStringFormat { get; set; }
Gets the collection containing visual tag elements displayed on the left side of the task card.
[Browsable(false)]
[RadEditItemsAction]
public RadItemOwnerCollection TagElements { get; }
Gets the collection of unique TagInfo objects representing categorization tags associated with this task card.
[Browsable(true)]
public ObservableHashSet<TagInfo> Tags { get; }
Gets the parent RadTaskBoardElement that contains this card, automatically locating it in the element hierarchy if not cached.
protected RadTaskBoardElement TaskBoardElement { get; }
Gets the visual element that displays the task card's title text and styling.
[Browsable(false)]
public LightVisualElement TitleElement { get; }
Gets or sets the title text displayed prominently at the top of the task card.
public string TitleText { get; set; }
Gets the collection containing visual user elements displayed on the right side of the task card.
[Browsable(false)]
public RadItemOwnerCollection UserElements { get; }
Gets the collection of UserInfo objects representing users assigned to or associated with this task card.
[Browsable(true)]
public ObservableCollection<UserInfo> Users { get; }
Methods
Arranges the task card's layout panels within the final allocated space, positioning content according to alignment settings.
Creates and configures all child visual elements including layout panels, title, description, tags, users, and subtasks elements.
protected override void CreateChildElements()
Overrides:
Creates and returns the description element for the task card. Override this method to provide a custom description element implementation.
protected virtual LightVisualElement CreateDescriptionElement()
A new LightVisualElement configured as the description element.
Creates and returns the subtasks element for the task card. Override this method to provide a custom subtasks element implementation.
protected virtual LightVisualElement CreateSubtasksElement()
A new LightVisualElement configured as the subtasks element.
Creates and returns the title element for the task card. Override this method to provide a custom title element implementation.
protected virtual LightVisualElement CreateTitleElement()
A new LightVisualElement configured as the title element.
Releases managed resources by unsubscribing from collection change events for users, tags, and subtasks collections.
protected override void DisposeManagedResources()
Overrides:
Initializes the default field values, event handlers, and visual properties for the task card element including drag-drop and selection behavior.
protected override void InitializeFields()
Overrides:
Measures the desired size of the task card element, ensuring it meets the minimum height requirement while accommodating content.
Handles bubbled events from child elements, specifically managing mouse up events to complete drag-and-drop operations.
protected override void OnBubbleEvent(RadElement sender, RoutedEventArgs args)
The element that originally raised the event.
argsRoutedEventArgsThe routed event arguments containing event data and cancellation information.
Overrides:
Called when the task card becomes deselected, updating the Selected property to reflect the new state.
protected override void OnDeselect()
Overrides:
Handles mouse down events, selecting the task card and initiating drag-and-drop operations for left-click interactions.
protected override void OnMouseDown(MouseEventArgs e)
The mouse event arguments containing button and position information.
Overrides:
Handles mouse move events, managing drag-and-drop threshold detection and scroll service activation during card dragging.
protected override void OnMouseMove(MouseEventArgs e)
The mouse event arguments containing button state and position information.
Overrides:
Called when the task card becomes selected, updating the Selected property to reflect the new state.
protected override void OnSelect()
Overrides:
Handles changes to the Tags collection, updating the visual representation and managing tag registration.
protected virtual void OnTagsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
The object that raised the collection changed event.
eNotifyCollectionChangedEventArgsThe event arguments containing details about the collection modification.
Handles changes to the Users collection, updating the visual representation of assigned users.
protected virtual void OnUsersCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
The object that raised the collection changed event.
eNotifyCollectionChangedEventArgsThe event arguments containing details about the collection modification.
Renders the task card element and applies accent visualization based on the configured AccentSettings.
Resets the MinimumHeight property to its default value and restores binding to the task board's default setting.
public void ResetMinimumHeight()
Updates the subtask display element with current completion status and tooltip information based on the subtask collection.
protected virtual void SetSubTasks()