menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SpreadsheetVirtualizingCellRendererBase<D, E> - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SpreadsheetVirtualizingCellRendererBase<D, E>

    VirtualizingCellRendererBase is an abstract base class for cell renderers that need live UIElement visuals displayed in a cell. You can derive from this class and provide the type of the UIElement you want to show inside cells as type parameter. The class provides strong typed virtual methods for initializing content of the cell and arranging the cell visuals.

    The class manages the creation of cells UIElement objects when the cell is scrolled into view and also unloading of the elements. The class offers an optimization in which elements can be recycled when AllowRecycle is set. In this case when a cell is scrolled out of view it is moved into a recycle bin and the next time a new element is scrolled into view the element is recovered from the recycle bin and reinitialized with the new content of the cell.

    when the user moves the mouse over the cell or if the UIElement is needed for other reasons.

    After a UIElement was created the virtual methods Syncfusion.UI.Xaml.Spreadsheet.CellRenderer.SpreadsheetVirtualizingCellRendererBase`2.WireEditUIElement(`1) and Syncfusion.UI.Xaml.Spreadsheet.CellRenderer.SpreadsheetVirtualizingCellRendererBase`2.UnwireEditUIElement(`1) are called to wire any event listeners.

    Updates to appearance and content of child elements, creation and unloading of elements will not trigger ArrangeOverride or Render calls in parent canvas.

    Inheritance
    System.Object
    SpreadsheetCellRendererBase
    SpreadsheetVirtualizingCellRendererBase<D, E>
    SpreadsheetComboBoxCellRenderer
    SpreadsheetHeaderCellRenderer
    SpreadsheetHyperlinkCellRenderer
    SpreadsheetRichTextBoxCellRenderer
    SpreadsheetTextBoxCellRenderer
    Implements
    ISpreadsheetCellRenderer
    System.IDisposable
    Inherited Members
    SpreadsheetCellRendererBase.AllowEditInFormulaBar
    SpreadsheetCellRendererBase.Arrange(RowColumnIndex, UIElement, Rect)
    SpreadsheetCellRendererBase.CharacterReceived(CharacterReceivedEventArgs)
    SpreadsheetCellRendererBase.CurrentCellElement
    SpreadsheetCellRendererBase.CurrentCellIndex
    SpreadsheetCellRendererBase.CurrentCellRendererElement
    SpreadsheetCellRendererBase.CurrentCellValueChanged(String)
    SpreadsheetCellRendererBase.CurrentStyle
    SpreadsheetCellRendererBase.DisplayElementOptimization
    SpreadsheetCellRendererBase.Dispose()
    SpreadsheetCellRendererBase.GetControlValue()
    SpreadsheetCellRendererBase.GetFormattedText(IStyle)
    SpreadsheetCellRendererBase.Grid
    SpreadsheetCellRendererBase.HasCurrentCellState
    SpreadsheetCellRendererBase.IsEditable
    SpreadsheetCellRendererBase.IsFocused
    SpreadsheetCellRendererBase.IsFocusible
    SpreadsheetCellRendererBase.IsInEditing
    SpreadsheetCellRendererBase.ISpreadsheetCellRenderer.ShouldGridTryToHandleKeyDown(KeyRoutedEventArgs)
    SpreadsheetCellRendererBase.Measure(RowColumnIndex, UIElement, Size)
    SpreadsheetCellRendererBase.MoveCurrentCell
    SpreadsheetCellRendererBase.OnCharacterReceived(CharacterReceivedEventArgs)
    SpreadsheetCellRendererBase.OnSaveChanges()
    SpreadsheetCellRendererBase.PrepareUIElements(RowColumnIndex, GridCell, SpreadsheetColumn, Boolean)
    SpreadsheetCellRendererBase.PreviewInputText
    SpreadsheetCellRendererBase.RaiseSaveChanges()
    SpreadsheetCellRendererBase.RefreshContent()
    SpreadsheetCellRendererBase.ResetCurrentCellState()
    SpreadsheetCellRendererBase.SetControlValue(Object)
    SpreadsheetCellRendererBase.SetCurrentCellState(RowColumnIndex, UIElement, Boolean, Boolean)
    SpreadsheetCellRendererBase.SetFocus(Boolean)
    SpreadsheetCellRendererBase.SetFocus(UIElement, Boolean)
    SpreadsheetCellRendererBase.ShouldGridTryToHandleKeyDown(KeyRoutedEventArgs)
    SpreadsheetCellRendererBase.SupportDrawingOptimization
    SpreadsheetCellRendererBase.SupportRenderOptimization
    SpreadsheetCellRendererBase.UnloadUIElements(GridCell)
    SpreadsheetCellRendererBase.UpdateCurrentCellState(UIElement, Boolean)
    SpreadsheetCellRendererBase.UseOnlyRendererElement
    Namespace: Syncfusion.UI.Xaml.Spreadsheet.CellRenderer
    Assembly: Syncfusion.SfSpreadsheet.UWP.dll
    Syntax
    public abstract class SpreadsheetVirtualizingCellRendererBase<D, E> : SpreadsheetCellRendererBase, ISpreadsheetCellRenderer, IDisposable where D : FrameworkElement, new()
        where E : FrameworkElement, new()
    Type Parameters
    Name Description
    D

    The type of the UIElement that should be placed inside cells in display mode.

    E

    The type of the UIElement that should be placed inside cells in edit mode.

    Constructors

    SpreadsheetVirtualizingCellRendererBase()

    Initializes a new instance of the SpreadsheetVirtualizingCellRendererBase<D, E> class.

    Declaration
    public SpreadsheetVirtualizingCellRendererBase()

    Fields

    DisplayRecycleBin

    Creates a new instance of VirtualizingCellUIElementBin<T> class.

    Declaration
    protected VirtualizingCellUIElementBin<D> DisplayRecycleBin
    Field Value
    Type
    VirtualizingCellUIElementBin<D>

    EditRecycleBin

    Creates a new instance of VirtualizingCellUIElementBin<T> class.

    Declaration
    protected VirtualizingCellUIElementBin<E> EditRecycleBin
    Field Value
    Type
    VirtualizingCellUIElementBin<E>

    TemplateRecycleBin

    Creates a new instance of VirtualizingCellUIElementBin<T> class.

    Declaration
    protected VirtualizingCellUIElementBin<ContentControl> TemplateRecycleBin
    Field Value
    Type
    VirtualizingCellUIElementBin<Windows.UI.Xaml.Controls.ContentControl>

    Properties

    AllowRecycle

    Gets or sets a value indicating whether elements can be recycled when scrolled out of view. In this case when a cell is scrolled out of view it is moved into a recycle bin and the next time a new element is scrolled into view the element is recovered from the recycle bin and reinitialized with the new content of the cell. The default value is false.

    Declaration
    public bool AllowRecycle { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if elements can be recycled when scrolled out of view; otherwise, false.

    Methods

    BeginEdit(RowColumnIndex, GridCell, SpreadsheetColumn)

    Invoked when the current cell in the view starts the editing process.

    Declaration
    public override sealed bool BeginEdit(RowColumnIndex cellRowColumnIndex, GridCell cellContainer, SpreadsheetColumn column)
    Parameters
    Type Name Description
    RowColumnIndex cellRowColumnIndex

    Coordinates of a cell.

    GridCell cellContainer

    An instance of GridCell.

    SpreadsheetColumn column

    An instance of SpreadsheetColumn.

    Returns
    Type Description
    System.Boolean

    Returns true if the current cell starts an editing; otherwise, false.

    Overrides
    SpreadsheetCellRendererBase.BeginEdit(RowColumnIndex, GridCell, SpreadsheetColumn)

    ClearRecycleBin()

    Clears all the items from RecycleBin.

    Declaration
    public override void ClearRecycleBin()
    Overrides
    SpreadsheetCellRendererBase.ClearRecycleBin()

    Dispose(Boolean)

    Releases all resources used by the Syncfusion.UI.Xaml.Spreadsheet.CellRenderer.SpreadsheetVirtualizingCellRendererBase.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    Dispose the instance, if it is True

    Overrides
    SpreadsheetCellRendererBase.Dispose(Boolean)
    Remarks

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    EndEdit(RowColumnIndex, GridCell, SpreadsheetColumn)

    Ends the editing operation occuring in the cell.

    Declaration
    public override sealed bool EndEdit(RowColumnIndex cellRowColumnIndex, GridCell cellContainer, SpreadsheetColumn column)
    Parameters
    Type Name Description
    RowColumnIndex cellRowColumnIndex

    Cooridantes of a cell.

    GridCell cellContainer

    An instance of GridCell.

    SpreadsheetColumn column

    An instance of SpreadsheetColumn.

    Returns
    Type Description
    System.Boolean

    Returns true if the edit ends on the cell ; otherwise, false.

    Overrides
    SpreadsheetCellRendererBase.EndEdit(RowColumnIndex, GridCell, SpreadsheetColumn)

    InitializeDisplayElement(RowColumnIndex, D, SpreadsheetColumn)

    Invoked when the display element is initialized on the cell.

    Declaration
    public void InitializeDisplayElement(RowColumnIndex rowColumnIndex, D uiElement, SpreadsheetColumn column)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    Coordinates of cell.

    D uiElement

    The display UIElement.

    SpreadsheetColumn column

    An instance of SpreadsheetColumn.

    InitializeEditElement(RowColumnIndex, E, SpreadsheetColumn)

    Invoked when the edit element is initialized on the cell.

    Declaration
    public void InitializeEditElement(RowColumnIndex rowColumnIndex, E uiElement, SpreadsheetColumn column)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    Coordinates of cell.

    E uiElement

    The edit UIElement.

    SpreadsheetColumn column

    An instance of SpreadsheetColumn.

    OnArrange(RowColumnIndex, UIElement, Rect)

    Invoked when the visual children of cell is arranged in view.

    Declaration
    protected override void OnArrange(RowColumnIndex cellRowColumnIndex, UIElement uiElement, Rect cellRect)
    Parameters
    Type Name Description
    RowColumnIndex cellRowColumnIndex

    The Coordinates of the cell.

    Windows.UI.Xaml.UIElement uiElement

    The corresponding UIElement that is to be arranged.

    Windows.Foundation.Rect cellRect

    The corresponding size of cell element for arranging the UIElement.

    Overrides
    SpreadsheetCellRendererBase.OnArrange(RowColumnIndex, UIElement, Rect)

    OnCreateDisplayUIElement()

    Creates a new UIElement for the display mode of cell.

    Declaration
    protected virtual D OnCreateDisplayUIElement()
    Returns
    Type Description
    D

    A UIElement for the display mode.

    OnCreateEditUIElement()

    Creates a new UIElement for the edit mode of cell.

    Declaration
    protected virtual E OnCreateEditUIElement()
    Returns
    Type Description
    E

    A UIElement for the edit mode.

    OnCreateTemplateUIElement()

    Creates a new template UIElement for the cell.

    Declaration
    protected virtual ContentControl OnCreateTemplateUIElement()
    Returns
    Type Description
    Windows.UI.Xaml.Controls.ContentControl

    An instance of System.Windows.Controls.

    OnEditElementLoaded(Object, RoutedEventArgs)

    Occurs when the Edit UIElement loaded in SpreadsheetColumn.

    Declaration
    protected virtual void OnEditElementLoaded(object sender, RoutedEventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    Windows.UI.Xaml.RoutedEventArgs e

    An System.Windows.RoutedEventArgs that contains the event data.

    OnEditElementLostFocus(Object, RoutedEventArgs)

    Declaration
    protected virtual void OnEditElementLostFocus(object sender, RoutedEventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    Windows.UI.Xaml.RoutedEventArgs e

    OnEditingComplete(UIElement)

    Invoked when the editing operation is completed on the cell.

    Declaration
    protected virtual void OnEditingComplete(UIElement currentRendererElement)
    Parameters
    Type Name Description
    Windows.UI.Xaml.UIElement currentRendererElement

    An instance of .

    OnEnteredEditMode(UIElement)

    Invoked when the cell is being entered into the edit mode.

    Declaration
    protected virtual void OnEnteredEditMode(UIElement currentRendererElement)
    Parameters
    Type Name Description
    Windows.UI.Xaml.UIElement currentRendererElement

    An instance of .

    OnInitializeDisplayElement(RowColumnIndex, D, SpreadsheetColumn)

    Invoked when the display element is initialized on the cell.

    Declaration
    protected abstract void OnInitializeDisplayElement(RowColumnIndex rowColumnIndex, D uiElement, SpreadsheetColumn column)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    Coordinates of cell.

    D uiElement

    The display UIElement.

    SpreadsheetColumn column

    An instance of SpreadsheetColumn.

    OnInitializeEditElement(RowColumnIndex, E, SpreadsheetColumn)

    Invoked when the edit element is initialized on the cell

    Declaration
    protected abstract void OnInitializeEditElement(RowColumnIndex rowColumnIndex, E uiElement, SpreadsheetColumn column)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    Coordinates of cell

    E uiElement

    The edit UIElement

    SpreadsheetColumn column

    An instance of SpreadsheetColumn

    OnMeasure(RowColumnIndex, UIElement, Size)

    Invoked to determine the size of the current cell.

    Declaration
    protected override void OnMeasure(RowColumnIndex cellRowColumnIndex, UIElement uiElement, Size availableSize)
    Parameters
    Type Name Description
    RowColumnIndex cellRowColumnIndex

    Coordinates of a cell.

    Windows.UI.Xaml.UIElement uiElement

    The corresponding UIElement to measure.

    Windows.Foundation.Size availableSize

    The size of element.

    Overrides
    SpreadsheetCellRendererBase.OnMeasure(RowColumnIndex, UIElement, Size)

    OnPrepareUIElements(RowColumnIndex, GridCell, SpreadsheetColumn, Boolean)

    Invoked when the UIElement for cell is prepared to render it in view . overrides this method and creates new UIElements and wires them with the parent cells control.

    Declaration
    protected override sealed GridCell OnPrepareUIElements(RowColumnIndex cellRowColumnIndex, GridCell cellContainer, SpreadsheetColumn column, bool isInEdit)
    Parameters
    Type Name Description
    RowColumnIndex cellRowColumnIndex

    Coordinates of a cell.

    GridCell cellContainer

    An instance of GridCell.

    SpreadsheetColumn column

    An instance of SpreadsheetColumn.

    System.Boolean isInEdit

    Specifies whether the element is editable or not.

    Returns
    Type Description
    GridCell

    An instance of new GridCell.

    Overrides
    SpreadsheetCellRendererBase.OnPrepareUIElements(RowColumnIndex, GridCell, SpreadsheetColumn, Boolean)

    OnUnloadUIElements(GridCell)

    Invoked when the cell is scrolled out of view or unloaded from the view. SpreadsheetVirtualizingCellRendererBase<D, E> overrides this method and either removes the cell renderer visuals from the parent or hide them and reuse it later in same element depending on whether AllowRecycle was set.

    Declaration
    protected override void OnUnloadUIElements(GridCell uiElement)
    Parameters
    Type Name Description
    GridCell uiElement

    An instance of GridCell.

    Overrides
    SpreadsheetCellRendererBase.OnUnloadUIElements(GridCell)

    OnUnwireDisplayUIElement(D)

    Unwires the events associated with display UIElement.

    Declaration
    protected virtual void OnUnwireDisplayUIElement(D uiElement)
    Parameters
    Type Name Description
    D uiElement

    The corresponding display UIElement to unwire its events.

    OnUnwireEditUIElement(E)

    Unwires the events associated with edit UIElement.

    Declaration
    protected virtual void OnUnwireEditUIElement(E uiElement)
    Parameters
    Type Name Description
    E uiElement

    The corresponding edit UIElement to unwire its events.

    OnUnWireTemplateUIElement(ContentControl)

    Unwires the events associated with template UIElement.

    Declaration
    protected virtual void OnUnWireTemplateUIElement(ContentControl uiElement)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Controls.ContentControl uiElement

    The corresponding template UIElement to unwire its events.

    OnUpdateCellStyle(RowColumnIndex, D, SpreadsheetColumn)

    Updates the style and content for display element.

    Declaration
    protected virtual void OnUpdateCellStyle(RowColumnIndex cellRowColumnIndex, D uiElement, SpreadsheetColumn column)
    Parameters
    Type Name Description
    RowColumnIndex cellRowColumnIndex

    Coordinates of a cell.

    D uiElement

    UIelement of the Display mode.

    SpreadsheetColumn column

    An instance of SfSpreadsheet.

    OnUpdateEditCellStyle(RowColumnIndex, E, SpreadsheetColumn)

    Updates the style and content for the edit element.

    Declaration
    protected virtual void OnUpdateEditCellStyle(RowColumnIndex cellRowColumnIndex, E uiElement, SpreadsheetColumn column)
    Parameters
    Type Name Description
    RowColumnIndex cellRowColumnIndex

    Coordinates of a cell.

    E uiElement

    Corresponding UIElement to update the edit element.

    SpreadsheetColumn column

    An instance of SpreadsheetColumn.

    OnUpdateTemplateElement(ContentControl, IStyle)

    Updates the Template UIElement with particular style info.

    Declaration
    protected virtual void OnUpdateTemplateElement(ContentControl uiElement, IStyle style)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Controls.ContentControl uiElement

    Corresponding UIElement to update the template element.

    IStyle style

    An instance of IStyle.

    OnWireDisplayUIElement(D)

    Wires the events associated with display UIElement.

    Declaration
    protected virtual void OnWireDisplayUIElement(D uiElement)
    Parameters
    Type Name Description
    D uiElement

    The corresponding display UIElement to wire its events.

    OnWireEditUIElement(E)

    Wires the events associated with edit UIElement.

    Declaration
    protected virtual void OnWireEditUIElement(E uiElement)
    Parameters
    Type Name Description
    E uiElement

    The corresponding edit UIElement to wire its events.

    OnWireTemplateUIElement(ContentControl)

    Wires the events associated with template UIElement.

    Declaration
    protected virtual void OnWireTemplateUIElement(ContentControl uiElement)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Controls.ContentControl uiElement

    The corresponding template UIElement to wire its events.

    UpdateCellStyle(RowColumnIndex, GridCell, SpreadsheetColumn, Boolean)

    Updates the style for the current cell in SfSpreadsheet.

    Declaration
    public override sealed void UpdateCellStyle(RowColumnIndex cellRowColumnIndex, GridCell uiElement, SpreadsheetColumn column, bool isInEdit)
    Parameters
    Type Name Description
    RowColumnIndex cellRowColumnIndex

    Coordinates of cell.

    GridCell uiElement

    An instance of GridCell.

    SpreadsheetColumn column

    An instance of SpreadsheetColumn.

    System.Boolean isInEdit

    True or False

    Overrides
    SpreadsheetCellRendererBase.UpdateCellStyle(RowColumnIndex, GridCell, SpreadsheetColumn, Boolean)

    Implements

    ISpreadsheetCellRenderer
    System.IDisposable

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved