A view model for Excel sheets (worksheets, charts).
More...
|
| int | CountShapes () |
| | Counts the charts and shapes that are embedded in the worksheet, or counts the chart sheet as 1. More...
|
| |
| int | CountCharts () |
| |
| bool | SelectShapes () |
| | Selects all shapes (chart and other graphic objects) on the sheet, or the chart if the sheet is a chart sheet. More...
|
| |
| bool | SelectCharts () |
| | Selects all charts on the sheet. More...
|
| |
| | SheetViewModel () |
| |
| | SheetViewModel (object sheet) |
| |
| void | Dispose () |
| |
| override object | RevealModelObject () |
| | Returns the model object that this view model wraps or null if there is no wrapped model object. More...
|
| |
| bool | IsViewModelOf (object model) |
| | Determines whether the current object is a view model of a particular model object. Returns false if either the model or the viewmodel's wrapped model object is null. More...
|
| |
| Window | InjectInto< T > () |
| | Injects the ViewModel into a newly created View and wires the RequestCloseView event. More...
|
| |
| Window | InjectInto (Window view) |
| | Injects the view model into an existing view by setting the view's DataContext. More...
|
| |
| void | InjectAndShowInThread< T > (IntPtr ownerForm) |
| | Creates a new thread that creates a new instance of the view T , sets its Forms owner and shows it modelessly. Use this to show views during asynchronous operations. More...
|
| |
| void | InjectAndShowInThread< T > () |
| | Creates a new thread that creates a new instance of the view T and shows it modelessly. Use this to show views during asynchronous operations. More...
|
| |
| void | InjectAndShowDialogInThread< T > (IntPtr ownerForm) |
| | Creates a new thread that creates a new instance of the view T and shows it as a dialog. Use this to show dialogs during asynchronous operations. More...
|
| |
| bool | IsViewModelOf (object model) |
| | Determines whether the current object is a view model of a particular model object. Returns false if either the model or the viewmodel's wrapped model object is null. More...
|
| |
| Window | InjectInto< T > () |
| | Injects the ViewModel into a newly created View and wires the RequestCloseView event. More...
|
| |
| Window | InjectInto (Window view) |
| | Injects the view model into an existing view by setting the view's DataContext. More...
|
| |
| void | InjectAndShowInThread< T > (IntPtr ownerForm) |
| | Creates a new thread that creates a new instance of the view T , sets its Forms owner and shows it modelessly. Use this to show views during asynchronous operations. More...
|
| |
| void | InjectAndShowInThread< T > () |
| | Creates a new thread that creates a new instance of the view T and shows it modelessly. Use this to show views during asynchronous operations. More...
|
| |
| void | InjectAndShowDialogInThread< T > (IntPtr ownerForm) |
| | Creates a new thread that creates a new instance of the view T and shows it as a dialog. Use this to show dialogs during asynchronous operations. More...
|
| |
A view model for Excel sheets (worksheets, charts).
◆ SheetViewModel() [1/2]
| XLToolbox.Excel.ViewModels.SheetViewModel.SheetViewModel |
( |
| ) |
|
|
inline |
◆ SheetViewModel() [2/2]
| XLToolbox.Excel.ViewModels.SheetViewModel.SheetViewModel |
( |
object |
sheet | ) |
|
|
inline |
◆ CountCharts()
| int XLToolbox.Excel.ViewModels.SheetViewModel.CountCharts |
( |
| ) |
|
|
inline |
◆ CountShapes()
| int XLToolbox.Excel.ViewModels.SheetViewModel.CountShapes |
( |
| ) |
|
|
inline |
Counts the charts and shapes that are embedded in the worksheet, or counts the chart sheet as 1.
- Returns
- Number of embedded charts and shapes, or 1 if the sheet is a chart.
◆ Dispose()
| void XLToolbox.Excel.ViewModels.SheetViewModel.Dispose |
( |
| ) |
|
|
inline |
◆ IsValidName()
| static bool XLToolbox.Excel.ViewModels.SheetViewModel.IsValidName |
( |
string |
name | ) |
|
|
inlinestatic |
Tests whether a string represents a valid Excel sheet name.
Excel sheet names must be 1 to 31 characters long and must not contain the characters ":/\[]*?".
- Parameters
-
- Returns
- True if name can be used as a sheet name, false if not.
◆ RequiresQuote() [1/2]
| static bool XLToolbox.Excel.ViewModels.SheetViewModel.RequiresQuote |
( |
string |
sheetName | ) |
|
|
inlinestatic |
◆ RequiresQuote() [2/2]
| static bool XLToolbox.Excel.ViewModels.SheetViewModel.RequiresQuote |
( |
string |
workbookPath, |
|
|
string |
sheetName |
|
) |
| |
|
inlinestatic |
◆ RevealModelObject()
| override object XLToolbox.Excel.ViewModels.SheetViewModel.RevealModelObject |
( |
| ) |
|
|
inlinevirtual |
Returns the model object that this view model wraps or null if there is no wrapped model object.
This is a method rather than a property to make data binding more difficult (if not impossible), because binding directly to the model object is discouraged. However, certain users such as a ViewModelCollection might need access to the wrapped model object.
- Returns
- Model object.
Implements Bovender.Mvvm.ViewModels.ViewModelBase.
◆ SelectCharts()
| bool XLToolbox.Excel.ViewModels.SheetViewModel.SelectCharts |
( |
| ) |
|
|
inline |
Selects all charts on the sheet.
- Returns
- True if the sheet is a chart or contains embedded charts; false if not.
◆ SelectShapes()
| bool XLToolbox.Excel.ViewModels.SheetViewModel.SelectShapes |
( |
| ) |
|
|
inline |
Selects all shapes (chart and other graphic objects) on the sheet, or the chart if the sheet is a chart sheet.
- Returns
- True if there are any charts and shapes on the sheet or if the sheet is a chart sheet; false if not.
◆ Chart
| Chart XLToolbox.Excel.ViewModels.SheetViewModel.Chart |
|
get |
Returns the Sheet as a Chart, or Null if the Sheet is a Worksheet.
◆ DisplayString
| override string XLToolbox.Excel.ViewModels.SheetViewModel.DisplayString |
|
getset |
◆ IsChart
| bool XLToolbox.Excel.ViewModels.SheetViewModel.IsChart |
|
get |
Indicates whether the Sheet model is a worksheet or a chart. This property is set by the constructor and provides quicker repeat access to the information than "myobject [AI]s Chart" statements.
◆ MaxColNotation
| string XLToolbox.Excel.ViewModels.SheetViewModel.MaxColNotation |
|
get |
◆ MaxCols
| long XLToolbox.Excel.ViewModels.SheetViewModel.MaxCols |
|
get |
◆ MaxRows
| long XLToolbox.Excel.ViewModels.SheetViewModel.MaxRows |
|
get |
◆ RefName
| string XLToolbox.Excel.ViewModels.SheetViewModel.RefName |
|
get |
◆ RefNameWithWorkbook
| string XLToolbox.Excel.ViewModels.SheetViewModel.RefNameWithWorkbook |
|
get |
◆ RefNameWithWorkbookAndPath
| string XLToolbox.Excel.ViewModels.SheetViewModel.RefNameWithWorkbookAndPath |
|
get |
◆ Sheet
| dynamic XLToolbox.Excel.ViewModels.SheetViewModel.Sheet |
|
getset |
◆ Worksheet
| Worksheet XLToolbox.Excel.ViewModels.SheetViewModel.Worksheet |
|
get |
Returns the Sheet as a Worksheet, or Null if the Sheet is a Chart.
The documentation for this class was generated from the following file: