Interface IViewModelProperty
- Namespace
- GroupeIsa.Neos.Designer.UIAbstractions
- Assembly
- GroupeIsa.Neos.Designer.UIAbstractions.dll
Represents the MVVM ViewModel of an UIView Property.
public interface IViewModelProperty : IViewModelFilterableAttribute
- Inherited Members
Properties
AlwaysLoaded
Gets a value indicating whether the property is always loaded by the GetAll request, and cannot be excluded by a screen.
bool AlwaysLoaded { get; }
Property Value
Caption
Gets or sets the caption of the property.
string Caption { get; set; }
Property Value
CustomFilterOperators
Gets the custom filter operators.
List<CustomFilterOperator> CustomFilterOperators { get; }
Property Value
DataType
Gets the data type of the property. null for embedded references.
DataType? DataType { get; }
Property Value
DatagridCaption
Gets or sets the caption of the property in a datagrid.
string DatagridCaption { get; set; }
Property Value
DatagridFrozen
Gets or sets a value indicating whether the property column in a datagrid is frozen.
bool DatagridFrozen { get; set; }
Property Value
DatagridMaxWidth
Gets or sets the datagrid max width.
int? DatagridMaxWidth { get; set; }
Property Value
- int?
DatagridMinWidth
Gets or sets the datagrid min width.
int? DatagridMinWidth { get; set; }
Property Value
- int?
DatagridMovable
Gets or sets a value indicating whether the property column in a datagrid is movable.
bool DatagridMovable { get; set; }
Property Value
DatagridPosition
Gets or sets the position of the property column in a datagrid.
int DatagridPosition { get; set; }
Property Value
DatagridVisible
Gets or sets a value indicating whether the property column is visible in a datagrid.
bool DatagridVisible { get; set; }
Property Value
DatagridWidth
Gets or sets the width of the property column in a datagrid. Set null for auto sizing.
string? DatagridWidth { get; set; }
Property Value
Displayable
Gets or sets a value indicating whether the property is displayable.
bool Displayable { get; set; }
Property Value
Documentation
Gets or sets the documentation of the property.
string? Documentation { get; set; }
Property Value
Ellipsis
Gets or sets a value indicating whether the text in the property column should be truncated with an ellipsis when it overflows.
bool Ellipsis { get; set; }
Property Value
EnumTypeName
Gets the enumeration type of the property if its datatype is Enum; otherwise null.
string? EnumTypeName { get; }
Property Value
FilterOperators
Gets or sets the filter operators to use for the property.
- By default, this is the full list of allowed for this property type.
- Setting an array containing forbidden values for this property type will raise an exception.
FilterOperator[] FilterOperators { get; set; }
Property Value
Format
Gets or sets the format used to display the number or date and time being edited.
string? Format { get; set; }
Property Value
GroupSummaryType
Gets or sets the group summary type.
SummaryType? GroupSummaryType { get; set; }
Property Value
Groupable
Gets or sets a value indicating whether the property can be used to group rows.
bool Groupable { get; set; }
Property Value
HorizontalAlign
Gets or sets the horizontal alignment.
ContentAlign HorizontalAlign { get; set; }
Property Value
LoadState
Gets the load status of the property across the rows currently held by the ViewModel's collection.
PropertyLoadState LoadState { get; }
Property Value
LookupDisplayProperty
Gets or sets the property to use for the display property.
IViewModelProperty? LookupDisplayProperty { get; set; }
Property Value
MaxLength
Gets or sets maximum text value length the property accepts.
int? MaxLength { get; set; }
Property Value
- int?
Multiline
Gets or sets a value indicating whether the property accepts multiline text.
bool Multiline { get; set; }
Property Value
Placeholder
Gets or sets the placeholder used to specify a short hint that describes the expected value of an input field.
string? Placeholder { get; set; }
Property Value
Scale
Gets or sets the scale for a property with a Decimal data type.
int? Scale { get; set; }
Property Value
- int?
ServerSideSortable
Gets a value indicating whether the property is server-side sortable.
bool ServerSideSortable { get; }
Property Value
Settable
Gets a value indicating whether the property can be set.
bool Settable { get; }
Property Value
ShouldLoad
Gets or sets a value indicating whether the property should be loaded by the next GetAll request. Has no effect if AlwaysLoaded is true. Setting this has no immediate effect on already-loaded data; it only takes effect on the next GetAll request (typically set from the Retrieving rule).
bool ShouldLoad { get; set; }
Property Value
SortProperty
Gets or sets the property to use for the sort when a sort is applied on this property.
IViewModelProperty? SortProperty { get; set; }
Property Value
Sortable
Gets or sets a value indicating whether the property is sortable.
bool Sortable { get; set; }
Property Value
SummaryTypes
Gets the summary types.
ISummaryTypes SummaryTypes { get; }
Property Value
TotalSummaryType
Gets or sets the total summary type.
SummaryType? TotalSummaryType { get; set; }
Property Value
UsedByApplicableUserStyleRule
Gets a value indicating whether this property is referenced by an applicable user style rule: a row-level conditional formatting rule (always applicable), or a column-level one whose own target column is currently visible in the datagrid. A Retrieving rule can combine this with DatagridVisible to decide whether to set ShouldLoad.
bool UsedByApplicableUserStyleRule { get; }
Property Value
Methods
EnableWatcher(bool)
Enables a watcher on the property of each element in the data source. This method is only necessary in specific cases, such as when a property with a complex getter is not reactive in the datagrid.
void EnableWatcher(bool deep = false)
Parameters
deepboolValue indicating whether the watcher must observe changes of all nested properties. Deep watch can be expensive when used on large data structures.
GetDecimalFormat(object?)
Gets the format for the given item.
string GetDecimalFormat(object? item)
Parameters
itemobjectItem for which the value is obtained.
Returns
- string
The format string.
Remarks
The method first retrieves the scale defined on the property. If the scale is not defined, it returns the default format. If a format is specified, it checks if the first character of the format is a standard numeric format specifier(one of 'C', 'D', 'E', 'F', 'G', 'N', 'P', 'R'). If it is, and the format length is 1, it appends the scale to the format specifier (example: C3, P2). Otherwise, it returns the specified format. If no format is specified, it returns a default format string with the scale (example: N3, N2).
GetEnumMember(string)
Gets the enum member.
IEnumMember GetEnumMember(string name)
Parameters
namestringThe enum member name.
Returns
- IEnumMember
The enum member.
Exceptions
- Exception
The enum member does not exist.
GetEnumMembers()
Gets the enum members.
IEnumMember[] GetEnumMembers()
Returns
- IEnumMember[]
The enum members.
GetFormVisible(object)
Gets a value indicating whether the input for the property is visible in a form.
bool GetFormVisible(object item)
Parameters
itemobjectItem for which the value is obtained.
Returns
- bool
Value.
GetFormattedValue(object)
Gets the formatted value of the property of an item.
string GetFormattedValue(object item)
Parameters
itemobjectItem for which the value is obtained.
Returns
- string
The formatted value.
GetMaxValue(object)
Gets the maximum numeric value the property accepts.
object? GetMaxValue(object item)
Parameters
itemobjectItem for which the value is obtained.
Returns
- object
Value.
GetMinValue(object)
Gets the minimum numeric value the property accepts.
object? GetMinValue(object item)
Parameters
itemobjectItem for which the value is obtained.
Returns
- object
Value.
GetReadOnly(object)
Gets a value indicating whether the input for the property can only be read.
bool GetReadOnly(object item)
Parameters
itemobjectItem for which the value is obtained.
Returns
- bool
Value.
GetRequired(object)
Gets a value indicating whether the property requires a value.
bool GetRequired(object item)
Parameters
itemobjectItem for which the value is obtained.
Returns
- bool
Value.
GetTabStop(object)
Gets a value indicating whether the input for the property can be focused using the Tab key.
bool GetTabStop(object item)
Parameters
itemobjectItem for which the value is obtained.
Returns
- bool
Value.
GetValue(object)
Gets the value of the property of an item.
object? GetValue(object item)
Parameters
itemobjectItem for which the value is obtained.
Returns
- object
Value.
IsFormVisibleExpression()
Checks if the form visible property is an expression.
bool IsFormVisibleExpression()
Returns
- bool
Trueif the form visible is an expression;Falseotherwise.
IsLoaded(object)
Gets a value indicating whether the property's value is loaded for the given item.
bool IsLoaded(object item)
Parameters
itemobjectItem for which the load status is obtained.
Returns
- bool
Value.
IsReadOnlyExpression()
Checks if the readonly property is an expression.
bool IsReadOnlyExpression()
Returns
- bool
Trueif the readonly is an expression;Falseotherwise.
IsRequiredExpression()
Checks if the required property is an expression.
bool IsRequiredExpression()
Returns
- bool
Trueif the required is an expression;Falseotherwise.
IsTabStopExpression()
Checks if the tab stop property is an expression.
bool IsTabStopExpression()
Returns
- bool
Trueif the tab stop is an expression;Falseotherwise.
RemoveFilterOperators(params FilterOperator[])
Sets the filter operators that can not be used with this property: the filter operators that can be used with this property will be the full list of available filters without the ones provided here.
void RemoveFilterOperators(params FilterOperator[] operators)
Parameters
operatorsFilterOperator[]Filter operators.
ResetValue(object)
Sets the value of the property of an item to the default value.
void ResetValue(object item)
Parameters
itemobjectItem for which the value is reset.
SetFormVisible(bool)
Sets a value indicating whether the input for the property is visible in a form.
void SetFormVisible(bool value)
Parameters
valueboolValue to set.
SetMaxValue(object?)
Sets the maximum numeric value the property accepts.
void SetMaxValue(object? value)
Parameters
valueobjectValue to set.
SetMinValue(object?)
Sets the minimum numeric value the property accepts.
void SetMinValue(object? value)
Parameters
valueobjectValue to set.
SetReadOnly(bool)
Sets a value indicating whether the input for this property can only be read.
void SetReadOnly(bool value)
Parameters
valueboolValue to set.
SetRequired(bool)
Sets a value indicating whether the property requires a value.
void SetRequired(bool value)
Parameters
valueboolValue to set.
SetTabStop(bool)
Sets a value whether the input for the property can be focused using the Tab key.
void SetTabStop(bool value)
Parameters
valueboolValue to set.
SetValue(object, object?)
Sets the value of the property of an item.
void SetValue(object item, object? value)