/// <summary> /// 无惨构造 /// </summary> public TabitemUC() { //设定样式 this.Style = (Style)Application.Current.Resources["TabItemStyle"]; //生产一个可关闭的Header header = createCloseableTabItem(); //设定Header this.Header = header; }
private TabitemHeaderUC createCloseableTabItem() { //实例化一个Header TabitemHeaderUC header = new TabitemHeaderUC(); //添加关闭按钮点击事件 header.btnClose.Click += BtnClose_Click; //返回Header return(header); }