Class GraphicCellRendererBase<T>
Defines the default implementation of IGraphicCellRenderer. You can create the custom GraphicCell renderer with this as a base class.
Inheritance
Namespace: Syncfusion.UI.Xaml.Spreadsheet.GraphicCells
Assembly: Syncfusion.SfSpreadsheet.WPF.dll
Syntax
public class GraphicCellRendererBase<T> : Object, IGraphicCellRenderer, IDisposable where T : FrameworkElement, new()
Type Parameters
Name | Description |
---|---|
T | Element type of the Custom Syncfusion.UI.Xaml.Spreadsheet.GraphicCells |
Constructors
GraphicCellRendererBase()
Declaration
public GraphicCellRendererBase()
Properties
CurrentGraphicObject
Gets or sets the current GraphicObject
Declaration
public GraphicObject CurrentGraphicObject { get; set; }
Property Value
Type |
---|
GraphicObject |
CurrentRendererElement
Gets or sets the rendered element of current GraphicCellControl.
Declaration
public UIElement CurrentRendererElement { get; set; }
Property Value
Type |
---|
System.Windows.UIElement |
GraphicModel
Gets or sets the SfCellGrid.
Declaration
public GraphicModel GraphicModel { get; set; }
Property Value
Type |
---|
GraphicModel |
IsEditable
Determines whether the IGraphicCellRenderer is editable or not
Declaration
public bool IsEditable { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
Arrange(UIElement, Rect)
Arrange the element of GraphicCell
Declaration
public virtual void Arrange(UIElement uiElement, Rect cellRect)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.UIElement | uiElement | |
System.Windows.Rect | cellRect |
Dispose()
Dispose the live instances of GraphicCellRendererBase()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
GetControlValue()
Used to get the current value from control
Declaration
public virtual object GetControlValue()
Returns
Type | Description |
---|---|
System.Object | value |
HandlePointerOperations(GraphicCellControl, GridPointerEventArgs)
This method is used to handle the mouse pointer operations.
Declaration
public virtual bool HandlePointerOperations(GraphicCellControl control, GridPointerEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
GraphicCellControl | control | An instance ofGraphicCellControlthat loads the content. |
GridPointerEventArgs | args | An instance ofGridPointerEventArgs that indicates mouse point operations |
Returns
Type | Description |
---|---|
System.Boolean | Return true,if the GraphicCell contains hyperlink;else false. |
InitializeElement(GraphicCellControl, GraphicObject)
Initialize the element of GraphicCellControl.
Declaration
public void InitializeElement(GraphicCellControl cellcontainer, GraphicObject graphicObject)
Parameters
Type | Name | Description |
---|---|---|
GraphicCellControl | cellcontainer | |
GraphicObject | graphicObject |
Measure(UIElement, Size)
Measure the element of GraphicCell
Declaration
public virtual void Measure(UIElement uiElement, Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.UIElement | uiElement | |
System.Windows.Size | availableSize |
OnCreateElement(GraphicObject)
Creates the new UIElement.
Declaration
protected virtual T OnCreateElement(GraphicObject obj)
Parameters
Type | Name | Description |
---|---|---|
GraphicObject | obj |
Returns
Type | Description |
---|---|
T | UIElement |
OnInitializeElement(GraphicCellControl, T, GraphicObject)
Initialize or update the properties of OnInitializeElement(GraphicCellControl, T, GraphicObject) and it s content.
Declaration
protected virtual void OnInitializeElement(GraphicCellControl container, T element, GraphicObject graphicObject)
Parameters
Type | Name | Description |
---|---|---|
GraphicCellControl | container | |
T | element | content of GraphicCellControl |
GraphicObject | graphicObject |
PrepareUIElements(GraphicCellControl, GraphicObject)
Creates a GraphicCellControl and its content
Declaration
public GraphicCellControl PrepareUIElements(GraphicCellControl cellContainer, GraphicObject graphicObject)
Parameters
Type | Name | Description |
---|---|---|
GraphicCellControl | cellContainer | |
GraphicObject | graphicObject |
Returns
Type |
---|
GraphicCellControl |
RaiseSaveChanges()
Raised when want to save the changes
Declaration
public virtual void RaiseSaveChanges()
ShouldTryToHandleKeyDown(GraphicCellControl, KeyEventArgs)
Used for RendererElement to handle the keydown.
Declaration
public virtual bool ShouldTryToHandleKeyDown(GraphicCellControl control, KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
GraphicCellControl | control | |
System.Windows.Input.KeyEventArgs | e |
Returns
Type | Description |
---|---|
System.Boolean | Returns true, if renderer element handles the key down |
UnloadUIElements(GraphicCellControl)
Unload the content of GraphicCellControl.
Declaration
public void UnloadUIElements(GraphicCellControl uiElement)
Parameters
Type | Name | Description |
---|---|---|
GraphicCellControl | uiElement |
UnWireUIElement(T)
Unhook events
Declaration
protected virtual void UnWireUIElement(T element)
Parameters
Type | Name | Description |
---|---|---|
T | element |
WireUIElement(T)
Hook events
Declaration
protected virtual void WireUIElement(T element)
Parameters
Type | Name | Description |
---|---|---|
T | element |