private void NewAuthorListTab()
        {
            AuthorListTabViewModel altvm = new AuthorListTabViewModel()
            {
                Parent = this
            };
            AuthorListTabView view = new AuthorListTabView();

            HasContextTab = Visibility.Visible;
            Tab AuthorListTab = new AuthorListTab()
            {
                Content = view, DataContext = altvm
            };

            AuthorListTab.IsSelected = true;
            models.Add(altvm);
            this.SelectedTab = AuthorListTab;
            Tabs.Add(AuthorListTab);
        }
        public void NewAuthorListTab(string FirstName, string LastName, BaseViewModel bmv)
        {
            Tabs.Remove(SelectedTab);
            models.Remove(bmv);

            AuthorListTabViewModel altvm = new AuthorListTabViewModel(FirstName, LastName)
            {
                Parent = this
            };
            AuthorListTabView view = new AuthorListTabView();

            Tab AuthorListTab = new AuthorListTab()
            {
                Content = view, DataContext = altvm
            };

            AuthorListTab.IsSelected = true;
            SelectedTab = AuthorListTab;
            models.Add(altvm);

            Tabs.Add(AuthorListTab);
        }
Beispiel #3
0
        private void OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            AuthorListTabViewModel avm = this.DataContext as AuthorListTabViewModel;

            avm.DoubleClickEvent.Execute(null);
        }