Example #1
0
        private void OnShowBook(object sender, ExecutedRoutedEventArgs e)
        {
            var bookUI = new BookUC();

            bookUI.DataContext = new Book {
                Title = "Professional C# 4 and .NET 4", Publisher = "Wrox Press", Isbn = "978-0-470-50225-9"
            };
            userControls.Add(new UIControlInfo {
                Title = "Book", Content = bookUI
            });
        }
Example #2
0
        //private void OnShowBook(object sender, ExecutedRoutedEventArgs e)
        //{
        //    var bookUI = new BookUC();
        //    // bookUI.DataContext = new Book { Title = "Professional C# 2018", Publisher = "Wrox Press", Isbn = "978-0-470-19137-8" };
        //    this.tabControl1.SelectedIndex = this.tabControl1.Items.Add(new TabItem { Header = "Book", Content = bookUI });
        //}

        private void OnShowBook(object sender, RoutedEventArgs e)
        {
            var bookUI = new BookUC();

            bookUI.DataContext = new Book {
                Title = "Professional C# 2008", Publisher = "Wrox Press", Isbn = "978-0-470-19137-8"
            };
            this.tabControl1.SelectedIndex = this.tabControl1.Items.Add(new TabItem {
                Header = "Book", Content = bookUI
            });
        }
Example #3
0
 private void OnShowBook(object sender, ExecutedRoutedEventArgs e)
 {
     var bookUI = new BookUC();
     bookUI.DataContext = new Book { Title = "Professional C# 4 and .NET 4", Publisher = "Wrox Press", Isbn = "978-0-470-50225-9" };
     userControls.Add(new UIControlInfo { Title = "Book", Content = bookUI });
 }
Example #4
0
        //private void OnShowBook(object sender, ExecutedRoutedEventArgs e)
        //{
        //    var bookUI = new BookUC();
        //    // bookUI.DataContext = new Book { Title = "Professional C# 2018", Publisher = "Wrox Press", Isbn = "978-0-470-19137-8" };
        //    this.tabControl1.SelectedIndex = this.tabControl1.Items.Add(new TabItem { Header = "Book", Content = bookUI });
        //}

        private void OnShowBook(object sender, RoutedEventArgs e)
        {
            var bookUI = new BookUC();
            bookUI.DataContext = new Book { Title = "Professional C# 2008", Publisher = "Wrox Press", Isbn = "978-0-470-19137-8" };
            this.tabControl1.SelectedIndex = this.tabControl1.Items.Add(new TabItem { Header = "Book", Content = bookUI });
        }