Class SectionAdvCollection
Represents a collection of SectionAdv elements.
Namespace: Syncfusion.Windows.Controls.RichTextBoxAdv
Assembly: Syncfusion.SfRichTextBoxAdv.WPF.dll
Syntax
public class SectionAdvCollection : NodeCollectionConstructors
SectionAdvCollection(Node)
Initializes a new instance of the SectionAdvCollection class for the specified Node.
Declaration
public SectionAdvCollection(Node owner)Parameters
| Type | Name | Description | 
|---|---|---|
| Node | owner | The owner of the SectionAdvCollection. The value can be null or an instance of DocumentAdv. | 
SectionAdvCollection(Node, IEnumerable<SectionAdv>)
Initializes a new instance of the SectionAdvCollection class that contains sections
copied from the specified collection for the specified Node.
Declaration
public SectionAdvCollection(Node owner, IEnumerable<SectionAdv> collection)Parameters
| Type | Name | Description | 
|---|---|---|
| Node | owner | The owner of the SectionAdvCollection. The value can be null or an instance of DocumentAdv. | 
| System.Collections.Generic.IEnumerable<SectionAdv> | collection | The collection from which the sections are copied. | 
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentNullException | The collection parameter cannot be null. | 
Properties
Item[Int32]
Gets the SectionAdv at the specified index in the SectionAdvCollection.
Declaration
public SectionAdv this[int index] { get; }Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | index | The zero-based index of the SectionAdv instance to get. | 
Property Value
| Type | Description | 
|---|---|
| SectionAdv | The SectionAdv instance at the specified  | 
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentOutOfRangeException | Index was out of range. Must be non-negative and less than the size of the collection. | 
Methods
Add(Node)
Adds the specified SectionAdv to the end of the SectionAdvCollection.
Declaration
public void Add(Node sectionAdv)Parameters
| Type | Name | Description | 
|---|---|---|
| Node | sectionAdv | The SectionAdv instance to be added to the end of the SectionAdvCollection. | 
First()
Returns the first SectionAdv instance from the SectionAdvCollection.
Declaration
public SectionAdv First()Returns
| Type | Description | 
|---|---|
| SectionAdv | The last SectionAdv instance in the SectionAdvCollection. | 
Exceptions
| Type | Condition | 
|---|---|
| System.InvalidOperationException | The source sequence is empty. | 
First(Func<Node, Boolean>)
Returns the first SectionAdv instance from the SectionAdvCollection that satisfies a specified condition.
Declaration
public SectionAdv First(Func<Node, bool> predicate)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Func<Node, System.Boolean> | predicate | A function to test each element for a condition. | 
Returns
| Type | Description | 
|---|---|
| SectionAdv | The first SectionAdv instance in the SectionAdvCollection that passes the test in
the specified  | 
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentNullException | predicate is null. | 
| System.InvalidOperationException | No element satisfies the condition in predicate.-or-The source sequence is empty. | 
Insert(Int32, Node)
Inserts the specified SectionAdv into the SectionAdvCollection at the specified index.
Declaration
public void Insert(int index, Node sectionAdv)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | index | The zero-based index at which the SectionAdv should be inserted. | 
| Node | sectionAdv | The SectionAdv instance to insert. | 
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentOutOfRangeException | Index was out of range. Must be non-negative and less than the size of the collection. | 
Last()
Returns the last SectionAdv instance from the SectionAdvCollection.
Declaration
public SectionAdv Last()Returns
| Type | Description | 
|---|---|
| SectionAdv | The last SectionAdv instance in the SectionAdvCollection. | 
Exceptions
| Type | Condition | 
|---|---|
| System.InvalidOperationException | The source sequence is empty. | 
Last(Func<Node, Boolean>)
Returns the last SectionAdv instance from the SectionAdvCollection that satisfies a specified condition.
Declaration
public SectionAdv Last(Func<Node, bool> predicate)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Func<Node, System.Boolean> | predicate | A function to test each element for a condition. | 
Returns
| Type | Description | 
|---|---|
| SectionAdv | The last SectionAdv instance in the SectionAdvCollection that passes the test in
the specified  | 
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentNullException | predicate is null. | 
| System.InvalidOperationException | No element satisfies the condition in predicate.-or-The source sequence is empty. | 
Remove(Node)
Removes the first occurrence of the specified SectionAdv from the SectionAdvCollection.
Declaration
public bool Remove(Node sectionAdv)Parameters
| Type | Name | Description | 
|---|---|---|
| Node | sectionAdv | The SectionAdv instance to remove from the SectionAdvCollection. | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | True, if the specified SectionAdv is successfully removed. Otherwise, false. This method also returns false if specified SectionAdv was not found in the original SectionAdvCollection. | 
RemoveAt(Int32)
Removes the SectionAdv instance at the specified index of the SectionAdvCollection.
Declaration
public void RemoveAt(int index)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | index | The zero-based index of the SectionAdv to remove. | 
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentOutOfRangeException | Index is less than zero.-or-Index is equal to or greater than item count. |