Carl Weis
Carl Weis

Reputation: 7062

How to add content to tab items at runtime in WPF

How can I add a Web Browser control to a tabItem in WPF at runtime?

Upvotes: 1

Views: 1838

Answers (1)

SLaks
SLaks

Reputation: 887453

tabItem.Content = new WebBrowser();

If you want multiple controls in the TabItem, you'll need to use a Panel, just like you would in XAML.

Upvotes: 3

Related Questions