private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            ProductsView.ProductId = 0;
            ProductsView.isView = false;

            Storyboard sb;
            if (_isExpanded != true)
            {
                sb = this.FindResource("gridin") as Storyboard;
                sb.Begin(this);
                _isExpanded = !_isExpanded;
            }

            var page = new ProductsView();
            frame.Navigate(page);
        }
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            var selectedProduct = dcProductsList.SelectedItem as ProductView;

            using (var context = new DatabaseContext())
            {
                if (selectedProduct != null)
                {
                    Storyboard sb;
                    if (_isExpanded != true)
                    {
                        sb = this.FindResource("gridin") as Storyboard;
                        sb.Begin(this);
                        _isExpanded = !_isExpanded;
                    }

                    ProductsView.ProductId = selectedProduct.ProductID;
                    ProductsView.isView = false;

                    var page = new ProductsView();
                    frame.Navigate(page);
                }
                else
                {
                    NullMessage();
                }
            }
        }
        private void btnView_Click(object sender, RoutedEventArgs e)
        {
            var selectedProduct = dcProductsList.SelectedItem as ProductView;

            Storyboard sb;
            if (selectedProduct != null)
            {
                if (selectedProduct.ProductID != ProductsView.ProductId)
                {
                    if (_isExpanded != true)
                    {
                        sb = this.FindResource("gridin") as Storyboard;
                        sb.Begin(this);
                        _isExpanded = !_isExpanded;
                    }

                    ProductsView.ProductId = selectedProduct.ProductID;
                    ProductsView.isView = true;

                    var page = new ProductsView();
                    frame.Navigate(page);
                }
                else
                {
                    sb = this.FindResource("gridout") as Storyboard;
                    sb.Begin(this);
                    _isExpanded = !_isExpanded;

                    frame.BackNavigationMode = BackNavigationMode.Root;
                    frame.GoBack();
                    ProductsView.isView = false;

                    LoadProducts();
                }
            }
            else
            {
                NullMessage();
            }
        }