Part 10 - Exercise: Tip Calculator as a Universal App

Sign in to queue

The Discussion

  • User profile image
    Aman717

    Sir, I am having trouble with windows 8 App

    If I add the following line

    billAmountTextBox.Text = tip.BillAmount;

    in my EventHandlerMethod:-

    private void billAmountTextBox_LostFocus(object sender, RoutedEventArgs e)
            {                    
                
            }

    then my Radio Buttons are not working, my BillAmountTextBlock is getting set to $0.0, also I am not able to get the results.

     

    However if I comment out this line

    billAmountTextBox.Text = tip.BillAmount;

     

    then everything seems to work fine.

  • User profile image
    swinghu

    Yes ,Aman717,there is a bug of the Part 10 code resouce ,the function amountTextBox_LostFocus should be like this:

    private void amountTextBox_LostFocus(object sender, RoutedEventArgs e)
    {
    tip.BillAmount = billAmountTextBox.Text ;
    }

  • User profile image
    Nagendra

    How do I change the start URI? I'm having a problem debugging a new page I've loaded but instead of getting a stack trace when I try to navigate to it, I get a useless global debugger line that tells me nothing about why the new page failed to load.. I'm hoping that by trying to change the start page, I can get insight into why I cant navigate to the page.

  • User profile image
    mWeb

    Hmmm, can't Aman717's issue be fixed by adding "tip = new Tip();" inside the public MainPage() declaration? Such as:

    public MainPage()
            {
                this.InitializeComponent();

                tip = new Tip();
            }

    When I had the same problem, I deduced that we hadn't done this as we had in our original building of the phone app. Is there a reason we wouldn't do this? (I ask sincerely, since this seemed to have fixed the issue.)

Add Your 2 Cents