Class AlterTextProperty
A view command that allows the user to alter a specifc text value in a multi-line popup text editor with optional formatting. For example:
string myText = "HellowWorld!";
var alter = new AlterTextProperty(View.Displayer, 
    () => true,
    () => myText,
    newValue => myText = newValue,
    new LemonEdge.Core.Client.CommandDecriptor("Hello", Images.ImageType.LockKey, "Alter the value"),
    Support.TextType.NormalText, null);
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Commands.ViewCommands
Assembly: ClientCore.dll
Syntax
public class AlterTextProperty : ViewCommand, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor
  Constructors
AlterTextProperty(IModelLayoutDisplayer, Func<Boolean>, Func<String>, Action<String>, ICommandDescriptor, TextType, Type)
Creates a new AlterTextCommand
Declaration
public AlterTextProperty(IModelLayoutDisplayer owner, Func<bool> canExecute, Func<string> initialValue, Action<string> newValue, ICommandDescriptor descriptor, TextType type, Type formulaContextType)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IModelLayoutDisplayer | owner | The owning host context for this command  | 
      
| System.Func<System.Boolean> | canExecute | A function that returns true if the text can be altered by the user  | 
      
| System.Func<System.String> | initialValue | The initial value for the text that is to be edited by the user  | 
      
| System.Action<System.String> | newValue | The method that is called when the user has modified the text  | 
      
| ICommandDescriptor | descriptor | A descriptor to use for the title, icon, etc and other attributes of this command  | 
      
| TextType | type | The type of the text to be displayed to the user, which enables the view to provide formatting if appropriate  | 
      
| System.Type | formulaContextType | If the   | 
      
Properties
Description
Declaration
public override string Description { get; }
  Property Value
| Type | Description | 
|---|---|
| System.String | 
Overrides
IconID
Declaration
public override Guid IconID { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Guid | 
Overrides
OverlayIconID
Declaration
public override Guid? OverlayIconID { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Nullable<System.Guid> | 
Overrides
Title
Declaration
public override string Title { get; }
  Property Value
| Type | Description | 
|---|---|
| System.String | 
Overrides
ToolTip
Declaration
public override string ToolTip { get; }
  Property Value
| Type | Description | 
|---|---|
| System.String | 
Overrides
Methods
InternalCanExecute(Object)
Returns if this command can be executed or not
Declaration
public override bool InternalCanExecute(object parameter)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | parameter | The command parameter  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | True if this command can be executed  | 
      
Overrides
InternalExecuteAsync(Object)
Displays a popup text editor window to the user to allow them to edit the value
Declaration
public override Task InternalExecuteAsync(object parameter)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | parameter | The command parameter  | 
      
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task | A task indicating the completion of the operation  |