예제 #1
0
 public Example()
 {
     InitializeComponent();
     this.orders.ItemsSource    = OrdersDataSource.GetOrders();
     this.company.ItemsSource   = CompaniesDataSource.GetCompanies();
     this.Category1.ItemsSource = ProductsDataSource.GetProductsByCategory("1");
 }
예제 #2
0
        void Products_SelectionChanged(object sender, System.Windows.RoutedEventArgs e)
        {
            RadTabItem item = Products.SelectedItem as RadTabItem;

            if (item == null)
            {
                return;
            }
            if (item.Tag.Equals("0"))
            {
                this.Category1.ItemsSource = ProductsDataSource.GetProductsByCategory("1");
            }
            else if (item.Tag.Equals("1"))
            {
                this.Category2.ItemsSource = ProductsDataSource.GetProductsByCategory("2");
            }
            else if (item.Tag.Equals("2"))
            {
                this.Category3.ItemsSource = ProductsDataSource.GetProductsByCategory("3");
            }
        }