How to manually manage the contents of TabItem content behind code?

I have a question regarding the contents of tabs.

How can I specifically choose what the current tab is selected and what I will put on this code, assuming it's tabItem

TabItem TI = new tabItem ();

TI.Content = __?

How to put it in code, for example, if I want to put the page of a user control / xaml in the contents of a tab element?

+3
source share
1 answer

Simply..

TI.Content = new yourUserControl()

but why here !! not in xaml?

+2
source

Source: https://habr.com/ru/post/1772548/


All Articles