[]
        
(Showing Draft Content)

C1.WPF.FlexGrid.C1FlexSheet

C1FlexSheet Class

Class that extends the C1FlexGrid control to provide Excel-like look and feel including a multi-sheet tabbed interface, support for cell formatting, outlining, and XLSX file import and export.

Namespace: C1.WPF.FlexGrid
Assembly: C1.WPF.FlexSheet.4.6.2.dll
Syntax
[TemplatePart(Name = "InsertLayer", Type = typeof(Canvas))]
[TemplatePart(Name = "CommentsLayer", Type = typeof(Canvas))]
public class C1FlexSheet : C1FlexGrid, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IPrintFactory

Constructors

Name Description
C1FlexSheet()

Initializes a new instance of a C1FlexSheet.

Fields

Name Description
CanRedoProperty

Identifies the CanUndo dependency property.

CanUndoProperty

Identifies the CanUndo dependency property.

EditOptionsProperty

Identifies the EditOptions dependency property.

EnableColumnFiltersProperty

Identifies the EnableColumnFiltersProperty dependency property.

ShowSingleTabProperty

Identifies the ShowSingleTab dependency property.

TabItemShapeProperty

Identifies the TabItemShape dependency property.

TopLeftCellPolygonBackgroundProperty

Identifies the TopLeftCellPolygonBackground dependency property.

Properties

Name Description
CalcEngine

Gets a reference to the FlexGrid calc engine.

CanRedo

Gets a value that determines whether the redo stack contains any actions.

CanUndo

Gets a value that determines whether the undo stack contains any actions.

ContextMenu

Gets the ContextMenu associated with this C1FlexSheet.

DataContext

Invalidate when the DataContext changes (since we don't get notifications in SL4).

EditOptions

Gets or sets the edit options of Flex sheet tabs

EnableColumnFilters

Gets or sets whether the grid should provide column filters.

this[int, Column]

Overridden to record individual cell assignments during a paste operation.

this[string]

Gets or sets the value stored in a grid cell using Excel range notation.

Sheets

Gets the collection of sheets on this book.

ShowSingleTab

Gets or sets a value that determines whether the tab strip is shown when the control has only one sheet.

TabItemShape

Gets or sets the geometric shape of the sheet tabs.

TopLeftCellPolygonBackground

Gets or sets top left cell polygon background

UndoStack

Gets the UndoStack associated with this C1FlexSheet.

Methods

Name Description
AddSheet(string, IEnumerable)

Adds a new bound sheet to this book and selects the new sheet.

AddSheet(string, int, int)

Adds a new sheet to this book.

ArrangeOverride(Size)

Overridden to update the layout of the panel with sheet tabs and horizontal scrollbar.

ClearRange(CellRange)

Clears all nullable/editable cells in a given range.

ClearSelection()

Clears all nullable cells in the selection.

Copy()

Overridden to copy editor content if the editor is active.

CreateBoundRow(object)

Create a row bound to the data item.

CreatePrintPaginator(Size, List<FrameworkElement>, PrintParameters, List<int>, List<int>, double)

Factory method to create printing paginator.

Evaluate(string)

Evaluates an expression and returns the result.

FindAll(string, FindOption)

Find all values according to user inputted.

FindNext(string, FindOption)

Find the value according to user inputted.

GetAddress(CellRange, bool)

Gets the address of a range using Excel notation (e.g. A1).

GetComment(int, int)

Get comment from cell.

GroupRows(CellRange?)

Group rows and create an outline.

InsertChart(C1Chart)

Insert chart to FlexSheet.

InsertComment(CellRange)

Insert comment.

InsertImage(ImageSource)

Insert image to FlexSheet

InsertSparkLine(SparkLineType, IEnumerable<double>, Sheet, CellRange)

Insert SparkLine to C1FlexSheet

Load(Stream, ImportFileFormat)

Load file to C1FlexSheet.

OnApplyTemplate()

Builds the visual tree for the C1FlexSheet control when a new template is applied.

OnCellEditEnded(CellEditEventArgs)

Invalidate all formula cells after any edits.

OnItemsSourceChanging(EventArgs)

Raises the ItemsSourceChanging event.

OnPreviewKeyDown(KeyEventArgs)

Overridden to handle keyboard shortcuts.

OnPreviewKeyUp(KeyEventArgs)
Paste()

Overridden to enable undoing paste actions.

Redo()

Repeats the last action (valid only when CanRedo returns true).

RemoveComment(CellRange)

Remove comment

RemoveDuplicates(CellRange, List<int>)

Delete duplicated rows.

SaveHtml(Stream, SaveOptions)

Save html file to stream.

SavePdf(Stream, PdfExportOptions)

Saves the grid to a PDF stream.

SaveTxt(Stream, SaveOptions)

Save txt file to stream.

SaveXls(Stream)

Save xls file to stream.

SaveXlsx(Stream)

Save xlsx file to stream.

SetCellAngle(IEnumerable<CellRange>, double, double)

Set rotate text for cell

SetCellFormat(IEnumerable<CellRange>, CellFormat, object)

Set format for cell. eg:SetCellFormat(flex.Selection.Cells, C1.WPF.FlexSheet.CellFormat.Background, new SolidColorBrush(Colors.Red));

SetCellIndent(IEnumerable<CellRange>, double)

Set text indent for cell

ShowFilterEditor()

Show the filter editor for the currently selected column.

ShowPrintPreviewWindow(Window)

Show the print preview window.

UnGroupRows(CellRange?)

Ungroup rows and create an outline.

Undo()

Undoes the last action (valid only when CanUndo returns true).

UpdateComment(CellRange, string)

Update comment