开发者

How do you add content to a tab control dynamically in wcf?

How do you add content to a tab control dynamically in wcf? I mean add content to the display area that comes visibile wh开发者_如何学运维en clicking on the tab control.

Allow me to rephrase this. I have a WCF app. In this app, I have a tab control that id defined in the XAML. It is easy to add content to the pages of the tab control in the XAML. How do I add content to the pages in the C# code at tuntime?


Assuming you mean WPF:

((TabItem)tabControl1.Items[0]).Content = new Button() { Content = "Dynamically Added Button" };

This adds a button to the first tab page. You could replace the button in this example with any other content.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜