private void ViewPerformance_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            Performance selectedPerformance = (Performance)Performance_lv.SelectedItem;
            UserControl usc = new UserControlStars(selectedPerformance);

            this.Content = usc;
        }
Esempio n. 2
0
        private static UserControl GetUserControlByName(string name)
        {
            UserControl resControl;

            switch (name)
            {
            case "ItemFirstPage":
                resControl = new UserControlFirstPage();
                break;

            case "ItemPerformances":
                resControl = new UserControlPerformances();
                break;

            case "ItemPrices":
                resControl = new UserControlPrices();
                break;

            case "ItemTour":
                resControl = new UserControlTour();
                break;

            case "ItemBasket":
                resControl = new UserControlBasket();
                break;

            case "ItemSubscribers":
                resControl = new UserControlSubscribers();
                break;

            case "ItemAboutUs":
                resControl = new UserControlAboutUs();
                break;

            case "ItemContact":
                resControl = new UserControlContact();
                break;

            case "ItemStars":
                resControl = new UserControlStars();
                break;

            default:
                resControl = new UserControlFirstPage();
                break;
            }
            return(resControl);
        }
        private void SeeStars_Btn(object sender, RoutedEventArgs e)
        {
            UserControl usc;

            if (Performance_lv.SelectedItem != null)
            {
                Performance selectedPerformance = (Performance)Performance_lv.SelectedItem;
                usc = new UserControlStars(selectedPerformance);
            }
            else
            {
                usc = new UserControlStars();
            }

            this.Content = usc;
        }