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); } }
private void PerformTopAlignmentSettingsForEditor(TKDataFormEditor editor, TKEntityProperty property) { editor.Style.SeparatorColor = null; editor.TextLabel.Font = UIFont.SystemFontOfSize(15); editor.Style.Insets = new UIEdgeInsets(1, editor.Style.Insets.Left, 5, editor.Style.Insets.Right); if (property.Name != "Gender") { TKGridLayout gridLayout = editor.GridLayout; TKGridLayoutCellDefinition editorDef = gridLayout.DefinitionForView(editor.Editor); if (editorDef != null) { editorDef.Row = new NSNumber(1); editorDef.Column = new NSNumber(1); } if (property.Name == "DateOfBirth") { TKDataFormDatePickerEditor dateEditor = (TKDataFormDatePickerEditor)editor; TKGridLayoutCellDefinition labelDef = gridLayout.DefinitionForView(dateEditor.EditorValueLabel); labelDef.Row = new NSNumber(1); labelDef.Column = new NSNumber(1); } TKGridLayoutCellDefinition feedbackDef = editor.GridLayout.DefinitionForView(editor.FeedbackLabel); feedbackDef.Row = new NSNumber(2); feedbackDef.Column = new NSNumber(1); feedbackDef.ColumnSpan = 1; this.SetEditorStyle(editor); } }