Links

Attributes for Designer

These attributes are associated with classes inheriting from OnScreenElement to allow the Designer to use them in the Screen Editor. You can use these attributes for your own implementation of OnScreenElements that are defined in the SW Model, e.g.:
[ScreenElements(
"appBasics:AppBasics",
"displayName:string:Name",
"imageName:Image:Textbox Image",
"filters:ScreenSelect")]
[DesignerControlColor("Purple")]
public class MsDynamicsDropdown : Dropdown
{ ... }

DesignerControlColorAttribute Class

Determines the color of the selection frame in the remote viewer when adding screen elements. Can be any color name from the .net colors.

ScreenElementsAttribute

Controls the input masks when adding this type of screen element in the Screen Editor.

Syntax:

public ScreenElementsAttribute(
params string[] elements
)
Every string in elements describes one parameter of the constructor of the screen element that will be instantiated in the generated screen. The syntax of the individual strings is as follows: "{ParameterName}:{Type}:{PropertyDisplayName}[:ImageName][:({SearchType.Value})][:optional][:notInCtor]" or "{ParameterName}:{ParameterValue}" properties in [ ] are optional
Name
Description
ParameterName
The name of the parameter in the constructor of the screen element, e.g. "content"
ParameterValue
A fixed string that will be directly used as the value of the parameter in the constructor. E.g.:
"tester:t"
Type
The type of the parameter, e.g. string or Image
If the type is an enum, you need to give the possible values in {}; these values will be given as a dropdown list in the screen edior UI. e.g.
"relativePosition:RelativePosition{Right,Under,Left,Above}:Relative Position of Checkbox"
Type strictstring can be used for strings that are validated not to contain whitespaces.
PropertyDisplayName
The name that will be shown in the screen editor UI for this parameter, e.g. "Search Image"
ImageName
If the Type is "Image" it means that one Image can be selected in the screen editor UI. For some controls you need to give multiple images that are present in a folder. In that case the Type needs to be given as "ImageFolder" and the imageName property will determine the name of the particular image in the folder. E.g.:
"activeImageReference:ImageFolder:Active Image:active:(Image)", "inactiveImageReference:ImageFolder:Inactive Image:inactive:(Image):optional"
SearchType.Value
A condition to show this property in the UI based on the selection of the searchType parameter. Requires the parameter searchType to be defined. E.g.:
"searchType:SearchType{Image,Text}:Search Type", "imageReference:Image:Search Image:(Image)", "searchText:string:Search Text:(Text)"
:optional
if the "optional" tag is present, the parameter is optional and does not need to be given in the UI in order to be able to add the screen element in the screen editor UI.
:notInCtor
If the "notInCtor" tag is present, the parameter will be shown in the screen editor UI but will not be included in the generated constructor call.
This is typically used for the searchType selection to switch between image and text search in the screen editor UI, but the generated constructor doesn't need the searchType parameter and distinguishes between image and text based on the type of the imageReference or searchText parameter.

SimpleModeElementAttribute Class

Determines whether or not the element will be available to add in simple mode of the screen editor (add multiple elements). If the attribute is added to an OnScreenElement, the element will be available.