TextControl Method
- Namespace
TXTextControl.Web. MVC
- Package
TXTextControl.asWeb TXTextControl.from nuget.org, the private NuGet feed or Text Control Offline PackagesWeb. DocumentEditor. dll
Description
Creates a TextControl.
Syntax
TextControl()
Creates a TextControl.
public TextControl TextControl();Public Function TextControl() As TextControlTextControl(TextControlSettings)
Creates a TextControl using settings from a given TextControlSettings object.
public TextControl TextControl(TextControlSettings settings);Public Function TextControl(settings As TextControlSettings) As TextControl| Parameter | Description |
|---|---|
| settings | A TextControlSettings object containing TextControl extension settings. |
TextControl(Action<TextControlSettings>)
Creates a TextControl using settings from a delegate method that accepts TextControlSettings as a parameter.
public TextControl TextControl(Action<TextControlSettings> method);Public Function TextControl(method As Action(Of TextControlSettings)) As TextControl| Parameter | Description |
|---|---|
| method | A delegate method that accepts TextControlSettings as a parameter. |
Return Value
A TextControl object implementing the TextControl functionality.
Examples
The following example shows how to add a TextControl editor to a view, specify its height and width, set a database file directory and open a document with it:
@using TXTextControl.Web.MVC
@using TXTextControl.Web
@Html.TXTextControl().TextControl(settings => {
settings.Width = "100%";
settings.Height = "600px";
settings.DatabaseFileDirectory = Server.MapPath("~/App_Data/Databases");
}).LoadText(Server.MapPath("~/App_Data/Documents/Demo.rtf"), StreamType.RichTextFormat).Render()The following example uses ControlsFactory.TextControl in a document-processing workflow.
var result = controlsFactory.TextControl();
Console.WriteLine(result);Dim result = controlsFactory.TextControl()
Console.WriteLine(result)