CardViewItem
Provides a label-and-editor layout item for a field displayed in each RadCardView card.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class CardViewItem : LayoutControlItemBase, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, ICardViewBoundItem
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementLayoutControlItemBaseCardViewItem...
Implements:
Inherited Members
Constructors
public CardViewItem()
Properties
Gets the card field.
[Browsable(false)]
public ListViewDetailColumn CardField { get; protected set; }
Implements:
Gets the editor label item.
public CardViewEditorItem EditorItem { get; }
Gets or sets the name of field associated with this item.
[Browsable(true)]
[TypeConverter(typeof(CardViewFieldNameTypeConverter))]
public string FieldName { get; set; }
Implements:
Gets or sets the fixed size of the text part which will be used when TextSizeMode is set to fixed.
[Browsable(true)]
public int TextFixedSize { get; set; }
Gets or sets the maximum size of the text part.
[Browsable(true)]
public int TextMaxSize { get; set; }
Gets or sets the minimum size of the text part.
[Browsable(true)]
public int TextMinSize { get; set; }
Gets or sets the position of the text of the item.
[Browsable(true)]
public virtual LayoutItemTextPosition TextPosition { get; set; }
Gets or sets the proportional size of the text part which will be used when TextSizeMode is set to proportional.
[Browsable(true)]
public float TextProportionalSize { get; set; }
Gets or sets the way in which the text part will be sized - proportionally or fixed-size.
[Browsable(true)]
public LayoutItemTextSizeMode TextSizeMode { get; set; }
Methods
Arranges the label and editor in the regions calculated from the field's text-layout settings.
Initializes the field label and creates its nested editor element.
protected override void CreateChildElements()
Overrides:
Creates the visual element that hosts this card field's editor.
protected virtual CardViewEditorItem CreateEditorItem()
The editor element nested in this field item.
Provides an override point for aligning the editor within its allocated rectangle; the default returns it unchanged.
Gets the rectangle in which the editor will be arranged.
protected virtual Rectangle GetEditorItemRectangle(RectangleF clientRect)
The client area of the item.
Returns:The arrange rectangle of the editor.
Calculates the editor's available rectangle after accounting for the field label's position and size.
protected virtual RectangleF GetEditorSize(SizeF availableSize)
The size available to the field item.
Returns:The rectangle allocated to the editor within the item.
Gets the rectangle in which the text part will be arranged.
protected virtual RectangleF GetTextRectangle(RectangleF clientRect)
The client area of the item.
Returns:The arrange rectangle of the text part.
Measures the label and editor using the rectangles produced by the field's text-layout settings.
Refreshes the displayed value when a property on the associated data column changes.
protected virtual void OnColumnPropertyChanged(object sender, PropertyChangedEventArgs e)
The column whose property changed.
ePropertyChangedEventArgsThe changed property name.
Re-measures and redraws the parent when a label-position or label-sizing property changes.
protected override void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
The changed property name.
Overrides:
Invalidates the parent layout when changing whether the field label is drawn.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The property change notification.
Overrides:
Updates the label from the associated column header and assigns the current field value to the editor. Image values and successfully converted byte arrays are assigned as images; other values are assigned as text.
public virtual void Synchronize()
Implements: