using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace TutorialsSilverlight
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
        }

        void Show(Control ctl)
        {
            // Display the specified control in the MainPage.
            // The currently displayed control is replaced with the new one.
            placeHolder.Content = ctl;
        }

        private void showSimpleBinding(object sender, RoutedEventArgs e)
        {
            Show(new SimpleBinding());
        }

        private void showMasterDetailBinding(object sender, RoutedEventArgs e)
        {
            Show(new MasterDetailBinding());
        }

        private void showServerSideFiltering(object sender, RoutedEventArgs e)
        {
            Show(new ServerSideFiltering());
        }

        private void showPaging(object sender, RoutedEventArgs e)
        {
            Show(new Paging());
        }

        private void showLargeDataSet(object sender, RoutedEventArgs e)
        {
            Show(new LargeDataset());
        }

        private void showCustomColumns(object sender, RoutedEventArgs e)
        {
            Show(new CustomColumns());
        }

        private void showDataSourcesInCode(object sender, RoutedEventArgs e)
        {
            Show(new DataSourcesInCode());
        }

        private void showClientSideQuerying(object sender, RoutedEventArgs e)
        {
            Show(new ClientSideQuerying());
        }

        private void showCategoryProductsView(object sender, RoutedEventArgs e)
        {
            Show(new CategoryProductsView());
        }        
    }
}
