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

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

            vm.WebBrowser.Dispose();

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

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

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

            
            if(WebViewTabs.Count == 1) {

                Home();
                return;
            }

            vm.WebBrowser.Dispose();

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

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

            var index = WebViewTabs.IndexOf(SelectedTab);

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

                SelectedTab = WebViewTabs[0];
            } else {

                SelectedTab = WebViewTabs[index + 1];
            }
        }
Exemplo n.º 9
0
        public void PrevTab() {

            var index = WebViewTabs.IndexOf(SelectedTab);

            if(index == 0) {

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

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