public PhoneTranslatePage()
        {
            InitializeComponent();

            Title = "Phoneword";

			_viewModel = new PhoneTranslateViewModel(App.AppViewModel);

            _viewModel.CallFailed = async (phoneNumber) => 
            {
                await DisplayAlert("Could not call", "Could not call '" + phoneNumber + "'.", "Close", null);
            };

            _viewModel.ShowCallHistoryDisplay = () =>
            {
                var callHistory = new CallHistoryPage();
                this.Navigation.PushAsync(callHistory);
            };

            this.BindingContext = _viewModel;
        }
Example #2
0
        public PhoneTranslatePage()
        {
            InitializeComponent();

            Title = "Phoneword";

            _viewModel = new PhoneTranslateViewModel(App.AppViewModel);

            _viewModel.CallFailed = async(phoneNumber) =>
            {
                await DisplayAlert("Could not call", "Could not call '" + phoneNumber + "'.", "Close", null);
            };

            _viewModel.ShowCallHistoryDisplay = () =>
            {
                var callHistory = new CallHistoryPage();
                this.Navigation.PushAsync(callHistory);
            };

            this.BindingContext = _viewModel;
        }