Class BlockAdvCollection
Represents a collection of BlockAdv elements.
Namespace: Syncfusion.Windows.Controls.RichTextBoxAdv
Assembly: Syncfusion.SfRichTextBoxAdv.WPF.dll
Syntax
public class BlockAdvCollection : NodeCollectionConstructors
BlockAdvCollection(Node)
Initializes a new instance of the BlockAdvCollection class for the specified Node.
Declaration
public BlockAdvCollection(Node owner)Parameters
| Type | Name | Description | 
|---|---|---|
| Node | owner | The owner of the BlockAdvCollection. The value can be null or an instance of SectionAdv, HeaderFooter, TableCellAdv or CommentAdv or ShapeContainer. | 
BlockAdvCollection(Node, IEnumerable<BlockAdv>)
Initializes a new instance of the BlockAdvCollection class that contains blocks
copied from the specified collection for the specified Node.
Declaration
public BlockAdvCollection(Node owner, IEnumerable<BlockAdv> collection)Parameters
| Type | Name | Description | 
|---|---|---|
| Node | owner | The owner of the BlockAdvCollection. The value can be null or an instance of SectionAdv, HeaderFooter, TableCellAdv or CommentAdv or ShapeContainer. | 
| System.Collections.Generic.IEnumerable<BlockAdv> | collection | The collection from which the blocks are copied. | 
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentNullException | The collection parameter cannot be null. | 
Properties
Item[Int32]
Gets the BlockAdv at the specified index in the BlockAdvCollection.
Declaration
public BlockAdv this[int index] { get; }Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | index | The zero-based index of the BlockAdv instance to get. | 
Property Value
| Type | Description | 
|---|---|
| BlockAdv | The BlockAdv 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 BlockAdv to the end of the BlockAdvCollection.
Declaration
public void Add(Node blockAdv)Parameters
| Type | Name | Description | 
|---|---|---|
| Node | blockAdv | The BlockAdv instance to be added to the end of the BlockAdvCollection. | 
First()
Returns the first BlockAdv instance from the BlockAdvCollection.
Declaration
public BlockAdv First()Returns
| Type | Description | 
|---|---|
| BlockAdv | The first BlockAdv instance in the BlockAdvCollection. | 
Exceptions
| Type | Condition | 
|---|---|
| System.InvalidOperationException | The source sequence is empty. | 
First(Func<Node, Boolean>)
Returns the first BlockAdv instance from the BlockAdvCollection that satisfies a specified condition.
Declaration
public BlockAdv 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 | 
|---|---|
| BlockAdv | The first BlockAdv instance in the BlockAdvCollection 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 BlockAdv into the BlockAdvCollection at the specified index.
Declaration
public void Insert(int index, Node blockAdv)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | index | The zero-based index at which the BlockAdv should be inserted. | 
| Node | blockAdv | The BlockAdv 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 BlockAdv instance from the BlockAdvCollection.
Declaration
public BlockAdv Last()Returns
| Type | Description | 
|---|---|
| BlockAdv | The last BlockAdv instance in the BlockAdvCollection. | 
Exceptions
| Type | Condition | 
|---|---|
| System.InvalidOperationException | The source sequence is empty. | 
Last(Func<Node, Boolean>)
Returns the last BlockAdv instance from the BlockAdvCollection that satisfies a specified condition.
Declaration
public BlockAdv 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 | 
|---|---|
| BlockAdv | The last BlockAdv instance in the BlockAdvCollection 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 BlockAdv from the BlockAdvCollection.
Declaration
public bool Remove(Node blockAdv)Parameters
| Type | Name | Description | 
|---|---|---|
| Node | blockAdv | The BlockAdv instance to remove from the BlockAdvCollection. | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | True, if the specified BlockAdv is successfully removed. Otherwise, false. This method also returns false if specified BlockAdv was not found in the original BlockAdvCollection. | 
RemoveAt(Int32)
Removes the BlockAdv instance at the specified index of the BlockAdvCollection.
Declaration
public void RemoveAt(int index)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | index | The zero-based index of the BlockAdv to remove. | 
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentOutOfRangeException | Index is less than zero.-or-Index is equal to or greater than item count. |