Class SheetCollection
Collection of Sheet.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Spreadsheet.Model
Assembly: Telerik.Windows.Documents.Spreadsheet.dll
Syntax
public class SheetCollection : IEnumerable<Sheet>, IEnumerable
Properties
ActiveSheet
Gets or sets the active sheet.
Declaration
public Sheet ActiveSheet { get; set; }
Property Value
Sheet
The active sheet. |
ActiveSheetIndex
Gets or sets the index of the active sheet.
Declaration
public int ActiveSheetIndex { get; set; }
Property Value
System.Int32
The index of the active sheet. |
Count
Gets the count of the sheets.
Declaration
public int Count { get; }
Property Value
System.Int32
The count of the sheets. |
Item[Int32]
Gets the Sheet at the specified index.
Declaration
public Sheet this[int index] { get; }
Parameters
System.Int32
index
|
Property Value
Sheet
The sheet. |
Item[String]
Gets the Sheet with the specified sheet name.
Declaration
public Sheet this[string sheetName] { get; }
Parameters
System.String
sheetName
|
Property Value
Sheet
The sheet. |
Workbook
Gets the workbook.
Declaration
public Workbook Workbook { get; }
Property Value
Workbook
The workbook. |
Methods
Add(SheetType)
Creates a new sheet of the specified type and adds it to the collection.
Declaration
public Sheet Add(SheetType type)
Parameters
SheetType
type
The type of sheet. |
Returns
Sheet
The newly created sheet. |
Contains(String)
Determines whether the collection contains a sheet with the specified sheet name.
Declaration
public bool Contains(string sheetName)
Parameters
System.String
sheetName
The name of the sheet. |
Returns
System.Boolean
The value indicating whether a sheet with the specified name is contained in the collection. |
Contains(Sheet)
Determines whether the sheet collection contains the specified sheet.
Declaration
public bool Contains(Sheet sheet)
Parameters
Sheet
sheet
The sheet. |
Returns
System.Boolean
The value indicating whether the sheet is contained in the collection. |
GetByName(String)
Gets a sheet by name.
Declaration
public Sheet GetByName(string sheetName)
Parameters
System.String
sheetName
The name of the sheet. |
Returns
Sheet
The sheet. |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<Sheet> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<Sheet>
A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection. |
Implements
Hide()
Hides the active sheet.
Declaration
public void Hide()
Hide(Int32)
Hides a sheet at the specified index.
Declaration
public void Hide(int index)
Parameters
System.Int32
index
The index. |
Hide(Sheet)
Hides a specified sheet.
Declaration
public void Hide(Sheet sheet)
Parameters
Sheet
sheet
The sheet. |
IndexOf(String)
Searches for the specified sheet by name and returns the zero-based index of the first occurrence within the SheetCollection. The search is case insensitive.
Declaration
public int IndexOf(string sheetName)
Parameters
System.String
sheetName
The name of the sheet. |
Returns
System.Int32
The index of the sheet. |
IndexOf(Sheet)
Searches for the specified sheet and returns the zero-based index of the first occurrence within the SheetCollection.
Declaration
public int IndexOf(Sheet sheet)
Parameters
Sheet
sheet
The sheet. |
Returns
System.Int32
The index of the sheet. |
Insert(Int32, SheetType)
Creates a new sheet of the specified type and inserts it in the collection at specified index.
Declaration
public Sheet Insert(int index, SheetType type)
Parameters
System.Int32
index
The index. |
SheetType
type
The type. |
Returns
Sheet
The newly created sheet. |
Insert(SheetType)
Creates a new sheet of the specified type and inserts it in the collection at the active sheet index.
Declaration
public Sheet Insert(SheetType type)
Parameters
SheetType
type
The type. |
Returns
Sheet
The newly created sheet. |
Move(Int32, Int32, Int32)
Moves the specified number of items from the specified index to a specified index.
Declaration
public void Move(int fromIndex, int itemCount, int toIndex)
Parameters
System.Int32
fromIndex
From index. |
System.Int32
itemCount
The item count. |
System.Int32
toIndex
To index. |
OnActiveSheetChanged()
Called when [active sheet changed].
Declaration
protected virtual void OnActiveSheetChanged()
OnActiveSheetIndexChanged()
Called when [active sheet index changed].
Declaration
protected virtual void OnActiveSheetIndexChanged()
OnChanged(SheetCollectionChangedEventArgs)
Raises the Changed event.
Declaration
protected virtual void OnChanged(SheetCollectionChangedEventArgs args)
Parameters
SheetCollectionChangedEventArgs
args
The SheetCollectionChangedEventArgs instance containing the event data. |
Remove()
Removes the active sheet.
Declaration
public void Remove()
Remove(String)
Removes the sheet with the specified name.
Declaration
public bool Remove(string sheetName)
Parameters
System.String
sheetName
The name of the sheet. |
Returns
System.Boolean
The value indicating whether a sheet with a specified name was found. |
Remove(Sheet)
Removes the specified sheet.
Declaration
public bool Remove(Sheet sheet)
Parameters
Sheet
sheet
The sheet. |
Returns
System.Boolean
The value indicating whether the specified sheet was found. |
RemoveAt(Int32)
Removes the sheet at the specified index.
Declaration
public void RemoveAt(int index)
Parameters
System.Int32
index
The index. |
Unhide(Int32)
Unhides a sheet at a specified index.
Declaration
public void Unhide(int index)
Parameters
System.Int32
index
The index. |
Unhide(Sheet)
Unhides a specified sheet.
Declaration
public void Unhide(Sheet sheet)
Parameters
Sheet
sheet
The sheet. |
Events
ActiveSheetChanged
Occurs when the active sheet has changed.
Declaration
public event EventHandler ActiveSheetChanged
Event Type
System.EventHandler
|
ActiveSheetIndexChanged
Occurs when the active sheet index has changed.
Declaration
public event EventHandler ActiveSheetIndexChanged
Event Type
System.EventHandler
|
Changed
Occurs when the collection has changed.
Declaration
public event EventHandler<SheetCollectionChangedEventArgs> Changed
Event Type
System.EventHandler<SheetCollectionChangedEventArgs>
|
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
System.Collections.IEnumerator
An System.Collections.IEnumerator object that can be used to iterate through the collection. |