ClassPromptInputAttachedFileElement
Represents a visual chip element for an attached file in RadPromptInputElement. Follows the TokenizedTextBlockElement pattern with a dedicated element class, granular factory methods, and theme roles for styling support.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class PromptInputAttachedFileElement : StackLayoutElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementStackLayoutElementPromptInputAttachedFileElement
Implements:
Inherited Members
Constructors
PromptInputAttachedFileElement(PromptInputAttachedFile)
Initializes a new instance of the PromptInputAttachedFileElement class.
Declaration
public PromptInputAttachedFileElement(PromptInputAttachedFile file)
Parameters
file
Properties
AttachedFile
Gets the associated attached file data item.
Declaration
public PromptInputAttachedFile AttachedFile { get; }
Property Value
IconElement
Gets the file icon element.
Declaration
public LightVisualElement IconElement { get; }
Property Value
NameElement
Gets the file name element.
Declaration
public LightVisualElement NameElement { get; }
Property Value
RemoveButton
Gets the remove button element.
Declaration
public LightVisualButtonElement RemoveButton { get; }
Property Value
SizeElement
Gets the file size element.
Declaration
public LightVisualElement SizeElement { get; }
Property Value
Methods
ApplyFileIcon(PromptInputFileIcon)
Applies the supplied PromptInputFileIcon to the file-icon visual.
When the icon carries an SvgImage, it is used;
otherwise the Image; otherwise the
Glyph character. Passing null or an empty
icon resets the chip back to the default extension-based glyph.
Declaration
public virtual void ApplyFileIcon(PromptInputFileIcon icon)
Parameters
icon
CreateChildElements()
Called by the element when constructed. Allows inheritors to build the element tree.
Declaration
protected override void CreateChildElements()
Overrides
CreateIconElement()
Creates the file icon element. Override to customize.
Declaration
protected virtual LightVisualElement CreateIconElement()
Returns
CreateNameElement()
Creates the file name element. Override to customize.
Declaration
protected virtual LightVisualElement CreateNameElement()
Returns
CreateRemoveButton()
Creates the remove button element. Override to customize.
Declaration
protected virtual LightVisualButtonElement CreateRemoveButton()
Returns
CreateSizeElement()
Creates the file size element. Override to customize.
Declaration
protected virtual LightVisualElement CreateSizeElement()
Returns
CreteTextPanel()
Creates a new instance of a stack layout element for displaying text content. Override to customize.
Declaration
protected virtual StackLayoutElement CreteTextPanel()
Returns
DisposeManagedResources()
Disposes of managed resources including cached images and SVG images when the element is being disposed.
Declaration
protected override void DisposeManagedResources()
Overrides
GetFileIconGlyph(string)
Returns the appropriate TelerikWebUI font glyph for the given file name based on its extension.
InitializeFields()
Initializes the internal fields and components of the LightVisualElement. This method sets up text primitives, image primitives, and layout management components.
Declaration
protected override void InitializeFields()
Overrides
Events
RemoveClicked
Occurs when the remove button is clicked.