
在silverlight中如何关闭嵌套在tabcontrol中page页面
2个回答
展开全部
//加入TabControl
TabControl tc=new TabControl();
TabItem tabitem = new TabItem();
tabitem.Content = new Page();
tc.Items.Add(tabitem);
//删除(关闭)
//如果关闭按钮在Page页面中 可在事件中加入
((this.Parent as TabItem).Parent as TabControl).Items.Remove((this.Parent as TabItem));
TabControl tc=new TabControl();
TabItem tabitem = new TabItem();
tabitem.Content = new Page();
tc.Items.Add(tabitem);
//删除(关闭)
//如果关闭按钮在Page页面中 可在事件中加入
((this.Parent as TabItem).Parent as TabControl).Items.Remove((this.Parent as TabItem));
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询