Inheritance: TabItemViewModel
Exemple #1
0
        public void AddTab(string url, bool forceWebView = false)
        {
            var tab = new WebViewContentViewModel(url, this, forceWebView);

            WebViewTabs.Add(tab);
            SelectedTab = tab;
        }
Exemple #2
0
        public void RemoveTab(WebViewContentViewModel vm)
        {
            if (WebViewTabs.Count == 1)
            {
                Home();
                return;
            }

            vm.WebBrowser.Dispose();

            WebViewTabs.Remove(vm);
            SelectedTab = WebViewTabs.First();
        }
Exemple #3
0
        public void NextTab()
        {
            var index = WebViewTabs.IndexOf(SelectedTab);

            if (WebViewTabs.Count - 1 == index)
            {
                SelectedTab = WebViewTabs[0];
            }
            else
            {
                SelectedTab = WebViewTabs[index + 1];
            }
        }
Exemple #4
0
        public void PrevTab()
        {
            var index = WebViewTabs.IndexOf(SelectedTab);

            if (index == 0)
            {
                SelectedTab = WebViewTabs[WebViewTabs.Count - 1];
            }
            else
            {
                SelectedTab = WebViewTabs[index - 1];
            }
        }
        public void RemoveTab(WebViewContentViewModel vm) {

            
            if(WebViewTabs.Count == 1) {

                Home();
                return;
            }

            vm.WebBrowser.Dispose();

            WebViewTabs.Remove(vm);
            SelectedTab = WebViewTabs.First();
        }
 public void RemoveTab(WebViewContentViewModel vm)
 {
     Owner.RemoveTab(vm);
 }
        public void AddTab(string url, bool forceWebView = false) {

            var tab = new WebViewContentViewModel(url, this, forceWebView);
            WebViewTabs.Add(tab);
            SelectedTab = tab;
        }
        public void NextTab() {

            var index = WebViewTabs.IndexOf(SelectedTab);

            if(WebViewTabs.Count - 1 == index) {

                SelectedTab = WebViewTabs[0];
            } else {

                SelectedTab = WebViewTabs[index + 1];
            }
        }
        public void PrevTab() {

            var index = WebViewTabs.IndexOf(SelectedTab);

            if(index == 0) {

                SelectedTab = WebViewTabs[WebViewTabs.Count - 1];
            } else {

                SelectedTab = WebViewTabs[index - 1];
            }
        }
Exemple #10
0
 public void RemoveTab(WebViewContentViewModel vm)
 {
     Owner.RemoveTab(vm);
 }