You may try just not specifying a Width/Height on your UserControl. It should fit to the controls hosted within.
<UserControl x:Class="MyUserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel>
<TextBlock x:Name="TextBlock1" Text="DisplayName Goes Here" />
<local:TimeIntervalControl x:Name="TimeInterval" />
</StackPanel>
</UserControl>
Another option is to use an IValueConverter to do some heavier lifting:
<UserControl x:Class="MyUserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<UserControl.Resources>
<local:MaxValueConverter x:Key="MaxValue" />
</UserControl.Resources>
<UserControl.Width>
<MultiBinding Converter="{StaticResource MaxValue}">
<Binding Path="ActualWidth" ElementName="TextBlock1" />
<Binding Path="ActualWidth" ElementName="TimeInterval" />
</MultiBinding>
</UserControl.Width>
<StackPanel>
<TextBlock x:Name="TextBlock1" Text="DisplayName Goes Here" />
<local:TimeIntervalControl x:Name="TimeInterval" />
</StackPanel>
</UserControl>
Heavy lifting in your MaxValueConverter:
public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (values == null)
{
return Binding.DoNothing;
}
return values.Max(obj => (obj is double) ? (double)obj : 0.0);
}