DialogFieldDefinition

Creates a TextBox control and associated Button. Clicking the button executes the delegate in the DialogAction property.
Note: Although this is called a DialogFieldDefinition, the button response doesn't have to display a dialog box - it can do anything you need. The demo app places the current timestamp into the text field, for example.


Properties

public Func<object, object> DialogAction { get; set; }
Sets or returns the delegate function that is called when the user clicks the action button. This delegate is passed the current value of the TextBox control, and should return a new value.

Example:
    definition.DialogAction = (object existingValue) => {
        String newValue = existing;
        // Obtain new value, from a modal window for example
        return newValue;
 };

public bool TextBoxReadOnly { get; set; }
Sets or returns a value indicating whether the TextBox control is read-only (the default) or not. This is useful for situations where you want the user to be able to modify the value manually.

public String ButtonCaption { get; set; }
Sets or returns the caption string to use for the action button. The default value is three periods forming an ellipsis ("...").

public Button ActionButton { get; }
Returns a reference to the Button control.

Controls created:
  • ContentControl (ContainerControl)
    • Grid
      • TextBox (InputControl)
      • Button

Last edited Oct 24, 2014 at 1:08 PM by DevKnightlie, version 3