Table of Contents

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

bool

Caption

Gets or sets the caption of the property.

string Caption { get; set; }

Property Value

string

CustomFilterOperators

Gets the custom filter operators.

List<CustomFilterOperator> CustomFilterOperators { get; }

Property Value

List<CustomFilterOperator>

DataType

Gets the data type of the property. null for embedded references.

DataType? DataType { get; }

Property Value

DataType?

DatagridCaption

Gets or sets the caption of the property in a datagrid.

string DatagridCaption { get; set; }

Property Value

string

DatagridFrozen

Gets or sets a value indicating whether the property column in a datagrid is frozen.

bool DatagridFrozen { get; set; }

Property Value

bool

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

bool

DatagridPosition

Gets or sets the position of the property column in a datagrid.

int DatagridPosition { get; set; }

Property Value

int

DatagridVisible

Gets or sets a value indicating whether the property column is visible in a datagrid.

bool DatagridVisible { get; set; }

Property Value

bool

DatagridWidth

Gets or sets the width of the property column in a datagrid. Set null for auto sizing.

string? DatagridWidth { get; set; }

Property Value

string

Displayable

Gets or sets a value indicating whether the property is displayable.

bool Displayable { get; set; }

Property Value

bool

Documentation

Gets or sets the documentation of the property.

string? Documentation { get; set; }

Property Value

string

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

bool

EnumTypeName

Gets the enumeration type of the property if its datatype is Enum; otherwise null.

string? EnumTypeName { get; }

Property Value

string

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

FilterOperator[]

Format

Gets or sets the format used to display the number or date and time being edited.

string? Format { get; set; }

Property Value

string

GroupSummaryType

Gets or sets the group summary type.

SummaryType? GroupSummaryType { get; set; }

Property Value

SummaryType?

HorizontalAlign

Gets or sets the horizontal alignment.

ContentAlign HorizontalAlign { get; set; }

Property Value

ContentAlign

LoadState

Gets the load status of the property across the rows currently held by the ViewModel's collection.

PropertyLoadState LoadState { get; }

Property Value

PropertyLoadState

LookupDisplayProperty

Gets or sets the property to use for the display property.

IViewModelProperty? LookupDisplayProperty { get; set; }

Property Value

IViewModelProperty

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

bool

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

string

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

bool

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

bool

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

IViewModelProperty

Sortable

Gets or sets a value indicating whether the property is sortable.

bool Sortable { get; set; }

Property Value

bool

SummaryTypes

Gets the summary types.

ISummaryTypes SummaryTypes { get; }

Property Value

ISummaryTypes

TotalSummaryType

Gets or sets the total summary type.

SummaryType? TotalSummaryType { get; set; }

Property Value

SummaryType?

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

bool

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

deep bool

Value 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

item object

Item 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

name string

The 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

item object

Item 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

item object

Item 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

item object

Item for which the value is obtained.

Returns

object

Value.

GetMinValue(object)

Gets the minimum numeric value the property accepts.

object? GetMinValue(object item)

Parameters

item object

Item 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

item object

Item 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

item object

Item 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

item object

Item 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

item object

Item for which the value is obtained.

Returns

object

Value.

IsFormVisibleExpression()

Checks if the form visible property is an expression.

bool IsFormVisibleExpression()

Returns

bool

True if the form visible is an expression; False otherwise.

IsLoaded(object)

Gets a value indicating whether the property's value is loaded for the given item.

bool IsLoaded(object item)

Parameters

item object

Item for which the load status is obtained.

Returns

bool

Value.

IsReadOnlyExpression()

Checks if the readonly property is an expression.

bool IsReadOnlyExpression()

Returns

bool

True if the readonly is an expression; False otherwise.

IsRequiredExpression()

Checks if the required property is an expression.

bool IsRequiredExpression()

Returns

bool

True if the required is an expression; False otherwise.

IsTabStopExpression()

Checks if the tab stop property is an expression.

bool IsTabStopExpression()

Returns

bool

True if the tab stop is an expression; False otherwise.

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

operators FilterOperator[]

Filter operators.

ResetValue(object)

Sets the value of the property of an item to the default value.

void ResetValue(object item)

Parameters

item object

Item 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

value bool

Value to set.

SetMaxValue(object?)

Sets the maximum numeric value the property accepts.

void SetMaxValue(object? value)

Parameters

value object

Value to set.

SetMinValue(object?)

Sets the minimum numeric value the property accepts.

void SetMinValue(object? value)

Parameters

value object

Value to set.

SetReadOnly(bool)

Sets a value indicating whether the input for this property can only be read.

void SetReadOnly(bool value)

Parameters

value bool

Value to set.

SetRequired(bool)

Sets a value indicating whether the property requires a value.

void SetRequired(bool value)

Parameters

value bool

Value 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

value bool

Value to set.

SetValue(object, object?)

Sets the value of the property of an item.

void SetValue(object item, object? value)

Parameters

item object

Item for which the value is set.

value object

Value to set.