开发者

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

开发者 https://www.devze.com 2023-01-05 08:48 出处:网络
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.

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

精彩评论

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

关注公众号