/// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void InvoiceGrid_DoubleTapped(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            FrameworkElement element = null;

            if ((element = e.OriginalSource as FrameworkElement) != null)
            {
                m_selectedIndex = Grid.GetRow(element);
            }
            InvoiceItem invoiceItem          = m_items[m_selectedIndex];
            int         selectedProductIndex = m_productList.IndexOf(m_productList[invoiceItem.ItemName]);

            m_fieldsPopup = new OutputDetailView(invoiceItem, "Edit the Fields", m_productList, selectedProductIndex);
            m_fieldsPopup.UpdateRequested += EditDialog_UpdateRequested;
            m_fieldsPopup.CloseRequested  += EditDialog_CloseRequested;
            m_fieldsPopup.lblTitle.Content = "Edit the Fields";
            RootGrid.Opacity      = 0.2;
            m_fieldsPopup.Opacity = 1;
            m_fieldsPopup.ShowDialog();
            RootGrid.Opacity = 1;
            //FrameworkElement element = null;
            //if ((element = e.OriginalSource as FrameworkElement) != null)
            //{
            //    m_selectedIndex = Grid.GetRow(element);
            //}
            //InvoiceItem invoiceItem = m_items[m_selectedIndex];
            //int selectedProductIndex = m_productList.IndexOf(m_productList[invoiceItem.Description]);
            ////m_fieldsPopup = new InputDetailView(invoiceItem, "Edit the Fields", m_productList, selectedProductIndex);
            //m_fieldsPopup.UpdateRequested += EditDialog_UpdateRequested;
            //m_fieldsPopup.CloseRequested += EditDialog_CloseRequested;
            //m_fieldsPopup.lblTitle.Content = "Edit the Fields";
            //RootGrid.Opacity = 0.2;
            //m_fieldsPopup.Opacity = 1;
            //m_fieldsPopup.ShowDialog();
            //RootGrid.Opacity = 1;
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Add(object sender, RoutedEventArgs e)
        {
            //this.Opacity = 0.5;
            //// blur the whole window
            //this.Effect = new BlurEffect();



            m_fieldsPopup = new OutputDetailView(m_productList);
            m_fieldsPopup.CloseRequested  += myDialog_CloseRequested;
            m_fieldsPopup.UpdateRequested += myDialog_UpdateRequested;
            m_fieldsPopup.Activated       += fieldsPopup_Opened;
            m_fieldsPopup.Background       = new SolidColorBrush(Colors.Black);
            RootGrid.Opacity      = 0.1;
            m_fieldsPopup.Opacity = 1;
            m_fieldsPopup.ShowDialog();
            RootGrid.Opacity = 1;
        }