Class ControlDisplayInfo
A complete control definition of the type of control that should be dynamically created in the client application UI via the LemonEdge.Client.Core.Views.Core.IBaseGrid<T>, LemonEdge.Client.Core.Views.Core.IBaseDefaultSingleView<T>, and IParamSingleViewer<T> views
Implements
Inherited Members
Namespace: LemonEdge.Client.UI.API.Controls
Assembly: LemonEdge.Client.UI.API.dll
Syntax
public class ControlDisplayInfo : ControlDisplayVisibilityInfo, IEquatable<ControlDisplayInfo>
Constructors
ControlDisplayInfo(short, ColumnDescriptor, bool, double?)
Creates a new control display info to define the control that should be created in the client application ui with the specified properties
Declaration
public ControlDisplayInfo(short index, ColumnDescriptor colDesc, bool editable, double? width)
Parameters
Type | Name | Description |
---|---|---|
short | index | The order this control should appear in the ui view it is created in |
ColumnDescriptor | colDesc | The definition of the property on the object this control is displaying and interacting with |
bool | editable | Indicates if the control is editable by the user |
double? | width | The width to display this control at in compliant client UIs. A null value defaults to the standard default width for that control type |
ControlDisplayInfo(short, Type, string, string, string, double?)
Creates a new control display info that is not bound to a property against the object, and instead evaluates a formula dynamically at runtime and displays the resulting value
This is only compatible with the LemonEdge.Client.Core.Views.Core.IBaseDefaultSingleView<T>, not the grid, or any other view just now.
Declaration
public ControlDisplayInfo(short index, Type propertyType, string formulaValue, string userFriendlyName, string description = null, double? width = null)
Parameters
Type | Name | Description |
---|---|---|
short | index | The order this control should appear in the ui view it is created in |
Type | propertyType | The type of the value returned from the formula |
string | formulaValue | The formula to be evaluated at runtime |
string | userFriendlyName | A user friendly label for the control |
string | description | An optional description for the control |
double? | width | An optional width |
Fields
DEFAULT_CONTROL_SIZE_INFINITE
The default control width for a control that should use all available width on the screen
Declaration
public const double DEFAULT_CONTROL_SIZE_INFINITE = 0
Field Value
Type | Description |
---|---|
double |
DEFAULT_CONTROL_WIDTH_LARGE
The default control width for a control that requires a large amount of screen space
Declaration
public const double DEFAULT_CONTROL_WIDTH_LARGE = 400
Field Value
Type | Description |
---|---|
double |
DEFAULT_CONTROL_WIDTH_NORMAL
The default control width for any normal control
Declaration
public const double DEFAULT_CONTROL_WIDTH_NORMAL = 175
Field Value
Type | Description |
---|---|
double |
DEFAULT_CONTROL_WIDTH_NUMBERONLY
The default control width for a control that should be displaying a number only
Declaration
public const double DEFAULT_CONTROL_WIDTH_NUMBERONLY = 115
Field Value
Type | Description |
---|---|
double |
DEFAULT_CONTROL_WIDTH_SMALL
The default control width for a control that should have a small amount of space.
Declaration
public const double DEFAULT_CONTROL_WIDTH_SMALL = 100
Field Value
Type | Description |
---|---|
double |
Relationship
If this control is bound to a property of type Guid, then this can hold the relationship definition of the id the property holds
This results in the control created in the ui being capable of selecting and searching for the specified entities according to the relationship definition
The system will automatically apply this to entities that have properties marked with an EntityRelationshipAttributeDeclaration
public EntityRelationship Relationship
Field Value
Type | Description |
---|---|
EntityRelationship |
Properties
AggregateFunction
In the case this control is within a LemonEdge.Client.Core.Views.Core.IBaseGrid<T> this can hold any aggregate function that should be applied to the results within the grid itself
Declaration
public AggregateFunction AggregateFunction { get; set; }
Property Value
Type | Description |
---|---|
AggregateFunction |
AggregateProperty
Declaration
public string AggregateProperty { get; set; }
Property Value
Type | Description |
---|---|
string |
AllowFiltering
In the case this control is within a LemonEdge.Client.Core.Views.Core.IBaseGrid<T> this indicates if the user should be allowed to filter the results of the grid by the values in this column
Declaration
public bool AllowFiltering { get; set; }
Property Value
Type | Description |
---|---|
bool |
AllowSorting
In the case this control is within a LemonEdge.Client.Core.Views.Core.IBaseGrid<T> this indicates if the user should be allowed to sort the results of the grid by the values in this column
Declaration
public bool AllowSorting { get; set; }
Property Value
Type | Description |
---|---|
bool |
CanBeSearchedWithText
Returns true if this control is a text property or a relationship property
Declaration
public bool CanBeSearchedWithText { get; }
Property Value
Type | Description |
---|---|
bool |
ChangeHighlighterPropertyName
Holds the name of a property (must be of type bool) the control should be bound to that highlights the value with a background colour if true, and leaves it as normal otherwise.
Used primarily in LemonEdge.Client.Core.Views.Core.IBaseGrid<T> views to highlight cells within a column depending on their value
Declaration
public string ChangeHighlighterPropertyName { get; set; }
Property Value
Type | Description |
---|---|
string |
CommentPropertyBinding
Declaration
public string CommentPropertyBinding { get; set; }
Property Value
Type | Description |
---|---|
string |
CustomComboItems
If the created control should just be a combo box of selectable items, then this holds the key/value items that will be displayed to the user to select from
Declaration
public IEnumerable<KeyValuePair<string, string>>? CustomComboItems { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<KeyValuePair<string, string>> |
CustomDynamicComboItemsBinding
In the case this control is within a LemonEdge.Client.Core.Views.Core.IBaseGrid<T> this provides the name of a property on the item type that returns an array of KeyValuePair<TKey, TValue> of string, string.
This is called on each item in the grid to get a custom drop down list that depends on other values
Declaration
public string CustomDynamicComboItemsBinding { get; set; }
Property Value
Type | Description |
---|---|
string |
CustomEntityTypeIDSingleLookupBinding
Declaration
public string CustomEntityTypeIDSingleLookupBinding { get; set; }
Property Value
Type | Description |
---|---|
string |
DefaultQueryFilter
Declaration
public ICustomLookupQuery DefaultQueryFilter { get; set; }
Property Value
Type | Description |
---|---|
ICustomLookupQuery |
Editable
Indicates if this control should be editable by the user or not
Declaration
public bool Editable { get; set; }
Property Value
Type | Description |
---|---|
bool |
Format
Any custom formatting to apply to the displayed value on this control
The LemonEdge.Client.Core.Views.Core.CustomDateTimeFormat can be used for the correct date time formats to use, otherwise standard .net culture formatting applies
Declaration
public string Format { get; set; }
Property Value
Type | Description |
---|---|
string |
FormulaContextType
Indicates this value holds a formula that should be editable in a formula popout window against the specified formula context type
Declaration
public Type FormulaContextType { get; set; }
Property Value
Type | Description |
---|---|
Type |
FormulaValue
Indicates this is a readonly control that should evaluate this formula dynamically at display the result
This is only compatible with the LemonEdge.Client.Core.Views.Core.IBaseDefaultSingleView<T>, not the grid, or any other view just now.
Declaration
public string FormulaValue { get; set; }
Property Value
Type | Description |
---|---|
string |
FromExtendedType
Declaration
public Type FromExtendedType { get; set; }
Property Value
Type | Description |
---|---|
Type |
GetQueryFilter
If this control has a defined Relationship then this filter is used by the control whenever the user selects an item for this control
The popup selection is filtered by this function so the user can only select certain entities rather than all entities in the entire system of the specified Relationship type
Declaration
public RelatedItemQueryFilter GetQueryFilter { get; set; }
Property Value
Type | Description |
---|---|
RelatedItemQueryFilter |
GetSearcher
Declaration
public RelatedItemSearchExecuter GetSearcher { get; set; }
Property Value
Type | Description |
---|---|
RelatedItemSearchExecuter |
Height
The height to display this control at in compliant client UIs.
Null means use the standard height appropriate for this control.
0 means infiniteDeclaration
public double? Height { get; set; }
Property Value
Type | Description |
---|---|
double? |
Index
The order this control should appear in the ui view it is created in
Declaration
public short Index { get; }
Property Value
Type | Description |
---|---|
short |
IsColorSelector
Indicates this string value holds the rgb value for a color, and can have a color selector control
Declaration
public bool IsColorSelector { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsHtmlContent
Indicates if this control should render as Html content.
Declaration
public bool IsHtmlContent { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsRichText
Indicates this control should be richt text
Declaration
public bool IsRichText { get; set; }
Property Value
Type | Description |
---|---|
bool |
MultiLine
Indicates if this control deals with text that it should allow multiple lines to be entered (accept the return key) or not
Declaration
public bool MultiLine { get; set; }
Property Value
Type | Description |
---|---|
bool |
MultiSelectIDs
Declaration
public bool MultiSelectIDs { get; set; }
Property Value
Type | Description |
---|---|
bool |
NameForSearchText
Returns the property to use for a text search.
Would normally be the property this control is bound to, but can be a label property if this is searching a relationship instead
Declaration
public string NameForSearchText { get; }
Property Value
Type | Description |
---|---|
string |
StringMultiSelectComboItemsSeparator
If the field is a string property it can be set to store multiple selections from the CustomComboItems by setting a separator value here.
The user will then be able to select multiple items at once, and all of them will be stored against the property as a list separated by this string for each item
Declaration
public string? StringMultiSelectComboItemsSeparator { get; set; }
Property Value
Type | Description |
---|---|
string |
TreatAsUri
Indicates if this control should render as a web page.
Declaration
public bool TreatAsUri { get; set; }
Property Value
Type | Description |
---|---|
bool |
VirtualPropForFormula
Indicates this property i a formula value only and isn't bound to a real property on the object
Declaration
public bool VirtualPropForFormula { get; set; }
Property Value
Type | Description |
---|---|
bool |
Width
The width to display this control at in compliant client UIs.
Null means use the standard width appropriate for this control.
0 means infiniteDeclaration
public double? Width { get; }
Property Value
Type | Description |
---|---|
double? |
Methods
Equals(ControlDisplayInfo)
Declaration
public bool Equals(ControlDisplayInfo other)
Parameters
Type | Name | Description |
---|---|---|
ControlDisplayInfo | other |
Returns
Type | Description |
---|---|
bool |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
Overrides
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |