По какой-то причине очевидное (элегантное) решение не работает в SL:
<ScrollViewer Name="w_scrollViewer" HorizontalScrollBarVisibility="Auto" Padding="10"
BorderThickness="0" Width="Auto" VerticalScrollBarVisibility="Auto">
<tk:DockPanel Name="w_dp" HorizontalAlignment="Left" Width="Auto" >
<TextBlock Margin="2" Name="w_tb"
Text="{Binding MainContent}" TextWrapping="Wrap"
Width="{Binding ActualWidth, ElementName=w_scrollViewer}"
/>
</tk:DockPanel>
</ScrollViewer>
но немного более "грубый" способ:
<StackPanel SizeChanged="w_sp_SizeChanged" Name="w_sp" tk:DockPanel.Dock="Left"
Background="#ddd" Width="Auto" Height="Auto">
<ScrollViewer Name="w_scrollViewer" HorizontalScrollBarVisibility="Auto"
Padding="10" Width="Auto" VerticalScrollBarVisibility="Auto"
SizeChanged="HandleScrollViewerSizeChanged" >
<tk:DockPanel HorizontalAlignment="Left" Width="Auto" >
<TextBlock Name="w_textBlock" Text="{Binding MainContent}" TextWrapping="Wrap" />
</tk:DockPanel>
</ScrollViewer>
</StackPanel>
код позади:
private void HandleScrollViewerSizeChanged(object sender, SizeChangedEventArgs e)
{
w_textBlock.Width = w_scrollViewer.ActualWidth;
}