Beispiel #1
0
        public NewCall()
        {
            this.InitializeComponent();
            TabItem  tab  = new TabItem();
            CallItem item = new CallItem();

            tab.Header  = "New Call";
            tab.Content = item;
            tabCall.Items.Add(tab);
            this.tabCall.SelectedItem = tab;
        }
Beispiel #2
0
        public void addCallItem()
        {
            TabItem  tab  = new TabItem();
            CallItem item = new CallItem();

            tab.Header  = "New Call";
            tab.Content = item;
            if (this.Parent is TabItem)
            {
                TabItem tabitem = this.Parent as TabItem;
                if (tabitem.Parent is TabControl)
                {
                    TabControl tabcontrol = tabitem.Parent as TabControl;
                    tabcontrol.Items.Add(tab);
                    tabcontrol.SelectedItem = tab;
                }
            }
        }