Esempio n. 1
0
 /// <summary>
 /// 无惨构造
 /// </summary>
 public TabitemUC()
 {
     //设定样式
     this.Style = (Style)Application.Current.Resources["TabItemStyle"];
     //生产一个可关闭的Header
     header = createCloseableTabItem();
     //设定Header
     this.Header = header;
 }
Esempio n. 2
0
        private TabitemHeaderUC createCloseableTabItem()
        {
            //实例化一个Header
            TabitemHeaderUC header = new TabitemHeaderUC();

            //添加关闭按钮点击事件
            header.btnClose.Click += BtnClose_Click;
            //返回Header
            return(header);
        }