[]
Creates a text range.
public C1TextRange CreateRange()
| Type | Description |
|---|---|
| C1TextRange | A new text range. |
Creates a range that begins with the specified starting character and continues through the specified length of characters.
public C1TextRange CreateRange(int start, int length)
| Type | Name | Description |
|---|---|---|
| int | start | The start position |
| int | length | The length of the range |
| Type | Description |
|---|---|
| C1TextRange | The text range. |
This code demonstrates the CreateRange(int, int) method.
private void button1_Click(object sender, EventArgs e)
{
c1Editor1.LoadXml("<html><head><title>Document</title></head><body><p>12<span>3</span>456</p></body></html>", new Uri("c:\"));
C1TextRange r = c1Editor1.CreateRange(1, 3);
Console.WriteLine(r.Text);
// Output: 234
}
Creates a range on the specified XmlNode.
public C1TextRange CreateRange(XmlNode node)
| Type | Name | Description |
|---|---|---|
| XmlNode | node | The target node. |
| Type | Description |
|---|---|
| C1TextRange | The text range. |
Creates a range between the specified start and end C1TextPointer.
public C1TextRange CreateRange(C1TextPointer start, C1TextPointer end)
| Type | Name | Description |
|---|---|---|
| C1TextPointer | start | The start pointer. |
| C1TextPointer | end | The end pointer. |
| Type | Description |
|---|---|
| C1TextRange | The text range. |
This code demonstrates the CreateRange(int, int) method.
private void button1_Click(object sender, EventArgs e)
{
c1Editor1.LoadXml("<html><head><title>Document</title></head><body><p>12<span>3</span>456</p></body></html>", new Uri("c:\"));
C1TextRange r = c1Editor1.CreateRange(1, 3);
Console.WriteLine(r.Text);
// Output: 234
}