示例#1
0
        private void PerformTopInlineAlignmentSettingsForEditor(TKDataFormEditor editor, TKEntityProperty property)
        {
            editor.Style.SeparatorColor = null;
            editor.Style.Insets         = new UIEdgeInsets(6, editor.Style.Insets.Left, 6, editor.Style.Insets.Right);

            TKGridLayout gridLayout = editor.GridLayout;

            this.SetEditorStyle(editor);

            if (property.Name == "DateOfBirth")
            {
                TKDataFormDatePickerEditor dateEditor = (TKDataFormDatePickerEditor)editor;
                TKGridLayoutCellDefinition labelDef   = gridLayout.DefinitionForView(dateEditor.EditorValueLabel);
                labelDef.Row    = new NSNumber(1);
                labelDef.Column = new NSNumber(1);
                gridLayout.SetHeight(44, labelDef.Row.Int32Value);

                TKGridLayoutCellDefinition feedbackDef = editor.GridLayout.DefinitionForView(editor.FeedbackLabel);
                feedbackDef.Row        = new NSNumber(2);
                feedbackDef.Column     = new NSNumber(1);
                feedbackDef.ColumnSpan = 1;
            }

            if (editor.IsKindOfClass(new Class(typeof(TKDataFormTextFieldEditor))))
            {
                editor.Style.TextLabelDisplayMode = TKDataFormEditorTextLabelDisplayMode.Hidden;
                TKGridLayoutCellDefinition titleDef = editor.GridLayout.DefinitionForView(editor.TextLabel);
                gridLayout.SetWidth(0, titleDef.Column.Int32Value);
            }
        }