private void Tax_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            ResetPayments();

            CalculatorControl oCalculatorControl;
            m_oCalculatorPopup = new Popup();
            m_oCalculatorPopup.VerticalOffset = 90;
            m_oCalculatorPopup.HorizontalOffset = 40;
            oCalculatorControl = new CalculatorControl();
            m_oCalculatorPopup.Child = oCalculatorControl;
            m_oCalculatorPopup.IsOpen = true;
            OnPropertyChanged("IsCalculatorClosed");

            oCalculatorControl.OKButton.Click += (s, args) =>
            {
                m_oCalculatorPopup.IsOpen = false;
                OnPropertyChanged("IsCalculatorClosed");
                m_dTaxRate = oCalculatorControl.Value;

                UpdateTotal();
            };

            oCalculatorControl.CancelButton.Click += (s, args) =>
            {
                m_oCalculatorPopup.IsOpen = false;
                OnPropertyChanged("IsCalculatorClosed");
            };
        }
        private void Cash_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            CalculatorControl oCalculatorControl;
            m_oCalculatorPopup = new Popup();
            m_oCalculatorPopup.VerticalOffset = 90;
            m_oCalculatorPopup.HorizontalOffset = 40;
            oCalculatorControl = new CalculatorControl();
            m_oCalculatorPopup.Child = oCalculatorControl;
            m_oCalculatorPopup.IsOpen = true;
            OnPropertyChanged("IsCalculatorClosed");

            oCalculatorControl.OKButton.Click += (s, args) =>
            {
                m_oCalculatorPopup.IsOpen = false;
                OnPropertyChanged("IsCalculatorClosed");
                m_dCash = oCalculatorControl.Value;
                OnPropertyChanged("Cash");

                m_dChange = m_dCash - m_dTotal;
                m_dChange = Math.Round(m_dChange, 2);
                OnPropertyChanged("Change");
            };

            oCalculatorControl.CancelButton.Click += (s, args) =>
            {
                m_oCalculatorPopup.IsOpen = false;
                OnPropertyChanged("IsCalculatorClosed");
            };
        }
        private void ItemCost_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            ResetPayments();

            CalculatorControl oCalculatorControl;
            m_oCalculatorPopup = new Popup();
            m_oCalculatorPopup.VerticalOffset = 90;
            m_oCalculatorPopup.HorizontalOffset = 40;
            oCalculatorControl = new CalculatorControl();
            m_oCalculatorPopup.Child = oCalculatorControl;
            m_oCalculatorPopup.IsOpen = true;
            OnPropertyChanged("IsCalculatorClosed");

            oCalculatorControl.m_oSelectInventoryButton.Click += (s, args) =>
                {
                    m_oCalculatorPopup.IsOpen = false;
                    OnPropertyChanged("IsCalculatorClosed");
                    OpenSelectProductPage();
                };

            oCalculatorControl.OKButton.Click += (s, args) =>
            {
                var oTextbox = sender as TextBox;
                if (oTextbox != null)
                {
                    oTextbox.Text = oCalculatorControl.Value.ToString("c");
                }
                else
                {
                    AddNewRowData(oCalculatorControl.Value.ToString("c"));
                }

                m_oCalculatorPopup.IsOpen = false;
                OnPropertyChanged("IsCalculatorClosed");

                m_oCostList.Add(oCalculatorControl.Value);
                UpdateTotal();
            };

            oCalculatorControl.CancelButton.Click += (s, args) =>
                {
                    m_oCalculatorPopup.IsOpen = false;
                    OnPropertyChanged("IsCalculatorClosed");
                };
        }