void ReleaseDesignerOutlets() { if (EntryTextField != null) { EntryTextField.Dispose(); EntryTextField = null; } if (SubmitTextButton != null) { SubmitTextButton.Dispose(); SubmitTextButton = null; } if (TextLabel != null) { TextLabel.Dispose(); TextLabel = null; } }
public override void ViewDidLoad() { base.ViewDidLoad(); HideKeyboardHandling(); _textLabelBinding = this.SetBinding( () => Vm.PreviousMessage, () => TextLabel.Text); EntryTextField.EditingDidEnd += (sender, e) => {}; _textFieldBinding = this.SetBinding( () => EntryTextField.Text) .UpdateSourceTrigger("EditingDidEnd") .WhenSourceChanges(() => Vm.Message = EntryTextField.Text); SubmitTextButton.TouchUpInside += (sender, e) => {}; SubmitTextButton.SetCommand("TouchUpInside", Vm.MessageCommand); }