Esempio n. 1
0
        public ProductBox(Model.Product.Product product, Page frame)
        {
            this.product = product;
            this.frame   = frame;

            // StackPanel properties.
            Height = 100;
            Width  = 100;

            // TextBlock properties.
            titleLabel = new TextBlock
            {
                Text = product.getName()
            };

            image = new Image
            {
                Source = product.getImage(),
                Height = 100,
                Width  = 100
            };

            Children.Add(titleLabel);
            Children.Add(image);
        }
Esempio n. 2
0
        protected override void OnMouseDown(MouseButtonEventArgs e)
        {
            base.OnMouseDown(e);
            Console.WriteLine(product.getName());
            ProductShowcase productShowcase = new ProductShowcase(product);

            frame.NavigationService.Navigate(productShowcase);
        }