public override void AwakeFromNib() { base.AwakeFromNib(); DeleteButton.SetCommand(DataContext.DeletePostCommand); LikeButton.SetCommand(DataContext.LikePostCommand); }
public override void ViewDidLoad() { base.ViewDidLoad(); _bindings.Add(this.SetBinding(() => _viewModel.AmountLabelText, () => AmountTextField.Text, BindingMode.TwoWay)); _bindings.Add(this.SetBinding(() => _viewModel.FirstItemLabelText, () => FirstItemLabel.Text)); _bindings.Add(this.SetBinding(() => _viewModel.FirstItemButtonText, () => FirstItemButtonText)); _bindings.Add(this.SetBinding(() => _viewModel.SecondItemLabelText, () => SecondItemLabel.Text)); _bindings.Add(this.SetBinding(() => _viewModel.SecondItemButtonText, () => SecondItemButtonText)); DeleteButton.SetCommand(_viewModel.DeleteTransactionAction); }
private void RegisterCommands() { // bind the default commands to the buttons zoomInButton.SetCommand(Commands.IncreaseZoom, graphControl); zoomOutButton.SetCommand(Commands.DecreaseZoom, graphControl); zoom100Button.SetCommand(Commands.Zoom, 1, graphControl); fitContentButton.SetCommand(Commands.FitContent, graphControl); undoButton.SetCommand(Commands.Undo, graphControl); redoButton.SetCommand(Commands.Redo, graphControl); GroupSelectionButton.SetCommand(Commands.GroupSelection, graphControl); UngroupSelectionButton.SetCommand(Commands.UngroupSelection, graphControl); CutButton.SetCommand(Commands.Cut, graphControl); copyButton.SetCommand(Commands.Copy, graphControl); PasteButton.SetCommand(Commands.Paste, graphControl); openButton.SetCommand(Commands.Open, graphControl); SaveButton.SetCommand(Commands.SaveAs, graphControl); DeleteButton.SetCommand(Commands.Delete, graphControl); }
public override void ViewDidLoad() { base.ViewDidLoad(); Button0.SetCommand(_viewModel.Button0Action); Button1.SetCommand(_viewModel.Button1Action); Button2.SetCommand(_viewModel.Button2Action); Button3.SetCommand(_viewModel.Button3Action); Button4.SetCommand(_viewModel.Button4Action); Button5.SetCommand(_viewModel.Button5Action); Button6.SetCommand(_viewModel.Button6Action); Button7.SetCommand(_viewModel.Button7Action); Button8.SetCommand(_viewModel.Button8Action); Button9.SetCommand(_viewModel.Button9Action); LeftButton.SetCommand(_viewModel.LeftButtonAction); CommaButton.SetCommand(_viewModel.CommaButtonAction); RightButton.SetCommand(_viewModel.RightButtonAction); AddRecordButton.SetCommand(_viewModel.AddRecordAction); DeleteButton.SetCommand(_viewModel.DeleteButtonAction); IncomeButton.SetCommand(_viewModel.IncomeButtonAction); ExpensesButton.SetCommand(_viewModel.ExpensesButtonAction); TransferButton.SetCommand(_viewModel.TransferButtonAction); _bindings.Add(this.SetBinding(() => _viewModel.SignText, () => SignLabel.Text)); _bindings.Add(this.SetBinding(() => _viewModel.LeftButtonText, () => LeftButtonText)); _bindings.Add(this.SetBinding(() => _viewModel.RightButtonText, () => RightButtonText)); _bindings.Add(this.SetBinding(() => _viewModel.AmountLabelText, () => AmountLabel.Text)); _bindings.Add(this.SetBinding(() => _viewModel.IncomeButtonColor, () => IncomeButton.BackgroundColor).ConvertSourceToTarget(x => x.ToNative())); _bindings.Add(this.SetBinding(() => _viewModel.TransButtonColor, () => TransferButton.BackgroundColor).ConvertSourceToTarget(x => x.ToNative())); _bindings.Add(this.SetBinding(() => _viewModel.ExpensesButtonColor, () => ExpensesButton.BackgroundColor).ConvertSourceToTarget(x => x.ToNative())); HolderView.ApplyStyle(_viewModel.MainStyling); TemplatesButton.ApplyStyle(_viewModel.MainStyling); RightButton.ApplyStyle(_viewModel.MainStyling); LeftButton.ApplyStyle(_viewModel.MainStyling); MiddleImageView.ApplyStyle(_viewModel.MainStyling); }