private void VoedingsstoffenListView_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var selectedProduct     = (Product)VoedingsstoffenListView.SelectedItem;
            var detailProductWindow = new ProductDetailWindow(selectedProduct);

            detailProductWindow.Show();
        }
예제 #2
0
        private void ListViewDagOverzicht_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var selectedSavedProduct = (SavedProduct)ListViewDagOverzicht.SelectedItem;
            var product = new Product()
            {
                Cholesterol = selectedSavedProduct.Cholesterol,
                ProductId   = selectedSavedProduct.OrginalProductId,
                Eiwit       = selectedSavedProduct.Eiwit,
                EnkelvoudigOnverzadigdVet = selectedSavedProduct.EnkelvoudigOnverzadigdVet,
                Kilocalorieën             = selectedSavedProduct.Kilocalorieën,
                Kilojoules   = selectedSavedProduct.Kilojoules,
                Koolhydraten = selectedSavedProduct.Koolhydraten,
                MeervoudigOnverzadigdeVetzuren = selectedSavedProduct.MeervoudigOnverzadigdeVetzuren,
                Naam    = selectedSavedProduct.Naam,
                Suikers = selectedSavedProduct.Suikers
            };
            var detailProductWindow = new ProductDetailWindow(product);

            detailProductWindow.Show();
        }