views:

112

answers:

0

As its container's width shrinks, I'm trying to get Button 1 to wrap its text until it can no longer do so, at which point the horizontal scrollbar kicks in. Right now, the button recognizes that it's got plenty of space due to the scrollviewer and doesn't wrap at all.

<ScrollViewer HorizontalScrollBarVisibility="Auto">
  <Grid>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="*" />
      <ColumnDefinition Width="Auto" />
    </Grid.ColumnDefinitions>
    <Button>
      <TextBlock Text="Button 1 - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." 
                 TextWrapping="Wrap" />
    </Button>
    <Button Content="Button 2" Grid.Column="1" />
  </Grid>
</ScrollViewer>

Any ideas?