コード例 #1
0
 protected BaseDataParameters
 (
     string text,
     string classAttribute,
     string toolTipText,
     string placeholder,
     string htmlType,
     TextFieldTemplateParameters textTemplate,
     DropDownTemplateParameters dropDownTemplate,
     MultiSelectTemplateParameters multiSelectTemplate,
     List <DirectiveParameters> directives,
     FormValidationSettingParameters validationSetting,
     bool?readOnly
 )
 {
     Text                = text;
     ClassAttribute      = classAttribute;
     ToolTipText         = toolTipText;
     Placeholder         = placeholder;
     HtmlType            = htmlType;
     TextTemplate        = textTemplate;
     DropDownTemplate    = dropDownTemplate;
     MultiSelectTemplate = multiSelectTemplate;
     Directives          = directives;
     ValidationSetting   = validationSetting;
     ReadOnly            = readOnly;
 }
コード例 #2
0
        public TextItemBindingParameters
        (
            [Comments("The section of the item template we're binding the property to.")]
            [Domain("Header,Text,Detail")]
            [NameValue(AttributeNames.USEFOREQUALITY, "true")]
            [NameValue(AttributeNames.USEFORHASHCODE, "true")]
            [NameValue(AttributeNames.DEFAULTVALUE, "Header")]
            string name,

            [Comments("Update fieldTypeSource first. The property to bind to the name section.")]
            [ParameterEditorControl(ParameterControlType.ParameterSourcedPropertyInput)]
            [NameValue(AttributeNames.PROPERTYSOURCEPARAMETER, "fieldTypeSource")]
            string property,

            [Comments("Label for the field.")]
            [NameValue(AttributeNames.DEFAULTVALUE, "Title")]
            string title,

            [Comments("Specify a format for the binding e.g. 'Value: {0:F2}'")]
            [NameValue(AttributeNames.DEFAULTVALUE, "{0}")]
            string stringFormat,

            [Comments("Useful when we need to one template in edit mode and a different one in add mode.  Holds the XAML template name for the field.")]
            TextFieldTemplateParameters textTemplate,

            [ParameterEditorControl(ParameterControlType.ParameterSourceOnly)]
            [NameValue(AttributeNames.DEFAULTVALUE, "Enrollment.Domain.Entities")]
            [Comments("Fully qualified class name for the model type.")]
            string fieldTypeSource = null
        ) : base(name, property, title, stringFormat, fieldTypeSource)
        {
            TextTemplate = textTemplate;
        }
コード例 #3
0
        public FormControlSettingsParameters
        (
            [ParameterEditorControl(ParameterControlType.ParameterSourcedPropertyInput)]
            [NameValue(AttributeNames.PROPERTYSOURCEPARAMETER, "fieldTypeSource")]
            [Comments("Update fieldTypeSource first. This property being edited.")]
            string field,

            [Comments("Label for the field.")]
            [NameValue(AttributeNames.DEFAULTVALUE, "Title")]
            string title,

            [Comments("Place holder text.")]
            [NameValue(AttributeNames.DEFAULTVALUE, "(Title) required")]
            string placeholder,

            [Comments("String format - useful for binding decimals.")]
            [NameValue(AttributeNames.DEFAULTVALUE, "{0}")]
            string stringFormat,

            [Comments("The type for the field being edited. Click the function button and use the configured GetType function.  Use the Assembly qualified type name for the type argument.  Use the full name (e.g. System.Int32) for literals or core platform types.")]
            Type type,

            [Comments("Defines the field's default value, validation functions (and arguments for the validator where necessary).")]
            FieldValidationSettingsParameters validationSetting = null,

            [Comments("Holds the XAML template name for the field.")]
            TextFieldTemplateParameters textTemplate = null,

            [Comments("Holds the XAML template name for the field plus additional drop-down related properties (textField, valueField, request details etc.).")]
            DropDownTemplateParameters dropDownTemplate = null,

            [Comments("Useful when we need to one template in edit mode and a different one in add mode.  Holds the XAML template name for the field.")]
            TextFieldTemplateParameters updateOnlytextTemplate = null,

            [ParameterEditorControl(ParameterControlType.ParameterSourceOnly)]
            [Comments("Fully qualified class name for the model type.")]
            string fieldTypeSource = "Contoso.Domain.Entities"
        )
        {
            Field                  = field;
            Title                  = title;
            Placeholder            = placeholder;
            StringFormat           = stringFormat;
            Type                   = type;
            ValidationSetting      = validationSetting;
            TextTemplate           = textTemplate;
            DropDownTemplate       = dropDownTemplate;
            UpdateOnlyTextTemplate = updateOnlytextTemplate;
        }
コード例 #4
0
        public InputDataParameters
        (
            [Comments("Form label.")]
            string text,

            [Comments("CSS class.")]
            string classAttribute,

            [Comments("Tool tip text.")]
            string toolTipText,

            [Comments("Place holder text.")]
            [NameValue(AttributeNames.DEFAULTVALUE, "(Title) is required.")]
            string placeholder,

            [Comments("text,numeric,boolean,date")]
            [Domain("text,numeric,boolean,date")]
            [NameValue(AttributeNames.DEFAULTVALUE, "text")]
            string htmlType,

            [Comments("HTML template applicable to input elements.")]
            TextFieldTemplateParameters textTemplate = null,

            [Comments("HTML template applicable to drop-down elements.")]
            DropDownTemplateParameters dropDownTemplate = null,

            [Comments("HTML template applicable to multi-select elements.")]
            MultiSelectTemplateParameters multiSelectTemplate = null,

            [Comments("Directives for conditionally performing UI actions e.g. hide, disable etc.")]
            List <DirectiveParameters> directives = null,

            [Comments("Defines the field's default value, validation functions (and arguments for the validator where necessary).")]
            FormValidationSettingParameters validationSetting = null,

            [Comments("False if the variable can be modified on the client otherwise true.")]
            [Domain("true,false")]
            [ParameterEditorControl(ParameterControlType.DropDown)]
            bool?readOnly = false
        )
            : base(text, classAttribute, toolTipText, placeholder, htmlType, textTemplate, dropDownTemplate, multiSelectTemplate, directives, validationSetting, readOnly)
        {
        }