How can I configure the button in this tip calculator to calculate the total using the...

50.1K

Verified Solution

Question

Programming

How can I configure the button in this tip calculator tocalculate the total using the entires for the bill and tippercentage? I'm using Visual Studio 2019 Xamarin.Forms

Main.Page.xaml


xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"
xmlns:d=\"http://xamarin.com/schemas/2014/forms/design\"
xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"
mc:Ignorable=\"d\"
x:Class=\"Accomplish_2.MainPage\"
BackgroundColor=\"Gray\"
Padding=\"5\">



HeightRequest=\"3\">
  
Keyboard=\"Numeric\"
x:Name=\"billTotal\">

  
Keyboard=\"Numeric\"
x:Name=\"tipPercent\">


  


Everything above should be good to go, I just can't figure outhow to get some actual calculations done with the other page of mycode.

Main.Page.xaml.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;

namespace Accomplish_2
{
// Learn more about making custom code visible in the Xamarin.Formspreviewer
// by visiting https://aka.ms/xamarinforms-previewer
[DesignTimeVisible(false)]
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}

private void Button_Clicked(object sender, EventArgs e)
{
????????_______________________________________________?????????
}
}
}

Answer & Explanation Solved by verified expert
3.7 Ratings (283 Votes)
Explanation stepsBased on code given to calculate total using the entries forthe bill and tip percentage using Visual Studio 2019 XamarinFormsThere are various ways to achieve this The simplest way is todirectly using xnamebillTotal as billTotalText to read thetext    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students