Class ViewSerializedParam
The root parameter type that all Param must inherit from. By default all views have this parameter type.
Custom types can be provided for by marking a IModelView with a ViewDescriptorEnumerator which specifies the parameter type for each ViewDescriptorInstance it returns
They can also be specified using the LemonEdge.Client.Core.Views.Core.ViewSerializedParamAttribute which a ViewDescriptorEnumerator can use, such as with the LemonEdge.Client.Core.Views.Core.IBaseGrid<T> enumerator which looks for this attribute to create custom parameters for the view descriptor instanceInheritance
Inherited Members
Namespace: LemonEdge.Client.Core.Views.Core
Assembly: LemonEdge.Client.UI.API.dll
Syntax
[DataContract]
public class ViewSerializedParam : SerializedParam, ICloneable, ICloneable<ViewSerializedParam>, INotifyPropertyChanged
Constructors
ViewSerializedParam()
Declaration
public ViewSerializedParam()
Properties
AutoSelectOnVisible
Indicates if this view has a formula, when visible it should be auto-selected
Declaration
public bool AutoSelectOnVisible { get; set; }
Property Value
Type | Description |
---|---|
bool |
FormulaVisibility
Whether the VisibilityFormula says this should be visible
Declaration
public bool FormulaVisibility { get; set; }
Property Value
Type | Description |
---|---|
bool |
HelpUrl
An override help url for this view
This is *not* serializable it is used as a temporary variable when the user edits these settings in the UI, and updates the actual ViewDescriptorInstance
Declaration
public string? HelpUrl { get; set; }
Property Value
Type | Description |
---|---|
string |
ViewDescriptor
The actual descriptor this param is for
This is *not* serializable it is used as a temporary variable when the user edits these settings in the UI, and updates the actual ViewDescriptorInstance
Declaration
public ViewDescriptorInstance? ViewDescriptor { get; set; }
Property Value
Type | Description |
---|---|
ViewDescriptorInstance |
ViewIcon
The default icon for this view
This is *not* serializable it is used as a temporary variable when the user edits these settings in the UI, and updates the actual ViewDescriptorInstance
Declaration
public Guid ViewIcon { get; set; }
Property Value
Type | Description |
---|---|
Guid |
ViewName
The user friendly name of this view
This is *not* serializable it is used as a temporary variable when the user edits these settings in the UI, and updates the actual ViewDescriptorInstance
Declaration
public string? ViewName { get; set; }
Property Value
Type | Description |
---|---|
string |
VisibilityFormula
A custom formula that works with the FormulaFunctionsWithViewContext to evaluate at runtime if this view should be visible or not
Declaration
public string? VisibilityFormula { get; set; }
Property Value
Type | Description |
---|---|
string |
Visible
Indicates if the view should be visible or not. Setting this to false overrides all other visibility settings. The default is true
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
bool |
VisibleOnlyToRoles
Contains a list of roles that this view is visible for
Declaration
public IEnumerable<Guid> VisibleOnlyToRoles { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Guid> |
Methods
AddVisibleOnlyToRole(Guid)
Adds the globally unique id of the role that this view should be visible for
Declaration
public void AddVisibleOnlyToRole(Guid roleID)
Parameters
Type | Name | Description |
---|---|---|
Guid | roleID | The id of a role that this view should be visible for |
Clone()
Creates a new instance of this class (of type ViewSerializedParam) with all the same property values as this instance
Declaration
public ViewSerializedParam Clone()
Returns
Type | Description |
---|---|
ViewSerializedParam | A new instance of this class with all the same property values as this instance |
CopyFromParam(SerializedParam)
Should be overridden by inheriting implementations to ensure all parameters values are copied from the specified
source
Declaration
protected override void CopyFromParam(SerializedParam source)
Parameters
Type | Name | Description |
---|---|---|
SerializedParam | source | The source instance of a SerializedParam that is of the same type as this one to copy parameter values from |
Overrides
Remarks
Used by the generic implementation of Clone()
CopyFromSource(ViewSerializedParam)
Updates all properties in this item to have the same properties as the source object.
Declaration
public void CopyFromSource(ViewSerializedParam source)
Parameters
Type | Name | Description |
---|---|---|
ViewSerializedParam | source | The source object to copy all values from. |
CreateNewParam()
Must be implemented by inheriting classes to provide a new instance of the current class type.
Used when cloning this SerializedParam to create a new instance of the same type
Declaration
protected override SerializedParam CreateNewParam()
Returns
Type | Description |
---|---|
SerializedParam | A new instance of the current SerializedParam type |
Overrides
OnPropChanged(string)
Declaration
protected void OnPropChanged(string propName)
Parameters
Type | Name | Description |
---|---|---|
string | propName |
RemoveVisibleOnlyToRole(Guid)
Ensures the specified role does not see this view by default
Declaration
public void RemoveVisibleOnlyToRole(Guid roleID)
Parameters
Type | Name | Description |
---|---|---|
Guid | roleID | The id of the role that this view should not be visible for |
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler? PropertyChanged
Event Type
Type | Description |
---|---|
PropertyChangedEventHandler |