private void Page_Loaded(object sender, RoutedEventArgs e) { LayoutView layoutView = (LayoutView)Utility.FindParent <Page>(this, "LayoutPage"); layoutView.StaffMenu.Background = (Brush)layoutView.BrushConverter.ConvertFrom("#FF333333"); layoutView.CustomerMenu.Background = (Brush)layoutView.BrushConverter.ConvertFrom("#FF333333"); layoutView.CartMenu.Background = (Brush)layoutView.BrushConverter.ConvertFrom("#FF333333"); layoutView.ProductMenu.Background = (Brush)layoutView.BrushConverter.ConvertFrom("#FF565656"); Product product = ProductViewModel.Product; if (product is CPU) { ProductTitle.Text = "Central Processing Unit (CPU)"; } else if (product is GPU) { ProductTitle.Text = "Graphics card (GPU)"; } else if (product is Motherboard) { ProductTitle.Text = "Motherboard"; } else if (product is Memory) { ProductTitle.Text = "Memory"; } else if (product is Storage) { ProductTitle.Text = "Storage"; } else if (product is PSU) { ProductTitle.Text = "Power supply"; } else // Case { ProductTitle.Text = "Case"; } }