コード例 #1
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);
        }
コード例 #2
0
        private void PricesGrid_Click(object sender, MouseButtonEventArgs e)
        {
            UserControl usc = new UserControlPrices();

            this.Content = usc;
        }