Windows Phone 7 – Simple calculator example

By -

Hello all,

Yes this time i am going to write Windows Phone 7 again, yes its again as i had written below articles for the WP7 category on this blog:

1. How to start with Windows Phone 7 Development?
2. Windows Phone 7 – Hello World Application
3. Windows Phone 7 – Types of Controls

And as being an android developer, i was trying to find out which platform will be most exciting to learn next, i have found myself to start with WP7 instead of BlackBerry because WP7 provides more flexibility than BlackBerry app development. FYI, i have also tried to develop basic example in BlackBerry but it requires a lot to implement this simple Calculator example where as here i just created this example in 10-15 minutes.

=> I hope you are done with Windows Phone 7 installation (which is mentioned in 1st link above) before starting with this example.

Here is a solution for Simple Calculator example:

WP7 Simple Calculator

WP7 Simple Calculator

WP7 Simple Calculator

WP7 Simple Calculator





Code for button click event:

  private void button1_Click(object sender, RoutedEventArgs e)
            txtResult.Text = Convert.ToString(Convert.ToInt32(txtFirstNo.Text) + Convert.ToInt32(txtSecondNo.Text));

What you say? Isn’t it cool? :)

Paresh Mayani

Lazy android developer, exploring the horizon of android development since 5 years. He is Senior Software engineer at InfoStretch Solutions Pvt. Ltd. He is the Head/Organizer of Google Developers Group (GDG), Ahmedabad

Loading Facebook Comments ...
Loading Disqus Comments ...