private void InitializeComponent() { this.Title = LocalizedStrings.NewTransaction; this.View.BackgroundColor = UIColor.White; this.NavigationController.NavigationBar.TitleTextAttributes = new UIStringAttributes() { ForegroundColor = UIColor.FromRGB(28, 104, 66) }; this.NavigationController.NavigationBar.TintColor = UIColor.FromRGB(28, 104, 66); this.NavigationController.NavigationBar.BarStyle = UIBarStyle.Default; SelectUserLabel.Text = LocalizedStrings.SelectUser; SelectUserLabel.Font = UIFont.SystemFontOfSize(16.0f); SelectUserLabel.TextColor = UIColor.FromRGB(28, 104, 66); SetAmountLabel.Text = LocalizedStrings.SetAmount; SetAmountLabel.Font = UIFont.SystemFontOfSize(16.0f); SetAmountLabel.TextColor = UIColor.FromRGB(28, 104, 66); SelectUserButton.SetTitleColor(UIColor.Black, UIControlState.Normal); SelectUserButton.TitleLabel.Font = UIFont.SystemFontOfSize(16.0f); SelectUserButton.BackgroundColor = UIColor.FromRGB(240, 240, 240); SelectUserButton.Layer.CornerRadius = 5; SelectUserButton.ClipsToBounds = true; AmountTextField.AttributedPlaceholder = new NSAttributedString($"{0}", font: UIFont.SystemFontOfSize(16.0f, UIFontWeight.Regular), foregroundColor: UIColor.FromRGB(155, 155, 155)); AmountTextField.KeyboardType = UIKeyboardType.DecimalPad; AmountTextField.Font = UIFont.SystemFontOfSize(16.0f, UIFontWeight.Regular); AmountTextField.AutocapitalizationType = UITextAutocapitalizationType.None; SendTransactionButton.SetTitle(LocalizedStrings.Send.ToUpper(), UIControlState.Normal); SendTransactionButton.SetTitleColor(UIColor.White, UIControlState.Normal); SendTransactionButton.TitleLabel.Font = UIFont.BoldSystemFontOfSize(16.0f); SendTransactionButton.BackgroundColor = UIColor.FromRGB(28, 104, 66); SendTransactionButton.Layer.CornerRadius = 5; SendTransactionButton.ClipsToBounds = true; View.AddSubviews(SelectUserButton, SelectUserLabel, SelectUserButtonLabel, SetAmountLabel, AmountTextField, SendTransactionButton); AddLayoutConstraints(); }
private void SetUpBindings() { Bindings.Add(this.SetBinding( () => Vm.UserName, () => SelectUserButtonLabel.Text, BindingMode.OneWay)); AmountTextField.EditingChanged += (s, e) => { }; Bindings.Add(this.SetBinding( () => AmountTextField.Text, () => Vm.Amount, BindingMode.OneWay)); SelectUserButton.TouchUpInside += (s, e) => { }; SelectUserButton.SetCommand( "TouchUpInside", Vm.SelectUsernameCommand); SendTransactionButton.TouchUpInside += (s, e) => { }; SendTransactionButton.SetCommand( "TouchUpInside", Vm.SendTransactionCommand); }