The TabControl's height depends on the height of the selected TabItem. In order to achieve your requirement you can get the height of the first tab item's Content and assign it to the tab control's Height. You can subscribe for the Loaded event of the TabControl and get the first tab item, then call the Measure() method of the content and get the desired height. I have prepared a sample project where you can see how to implement the desired behavior.
sender, RoutedEventArgs e)
var tabControl = sender
var maxSize = 0d;
var container = tabControl.ItemContainerGenerator.ContainerFromIndex(0)
var content = container.Content
maxSize = content.DesiredSize.Height;
tabControl.Height = maxSize;
If this is not the solution you are looking for, please don't hesitate to contact us again.
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items