TextBlockにボーダーラインをつけるをつける方法

なんとなくTextBlockを使用したくなり、borderの設定ないかなと見ていたんだけどなかったから無理やりひいた

<Grid Height="{Binding ElementName=textBlock1,Path=Height}" 
      Width="{Binding ElementName=textBlock1,Path=Width}" Margin="15,300,350,15">
  <Border BorderBrush="DimGray" BorderThickness="2">
    <ScrollViewer>
      <TextBlock HorizontalAlignment="Left" Name="textBlock1" Text="" VerticalAlignment="Top" />
    </ScrollViewer>
  </Border>
</Grid>

これでデータを見ることは可能になった

<ScrollViewer></ScrollViewer>

を記載しているのはTextBlockの高さ以上の行が含まれた場合、それを見ることができるように


----------------追記(2010/10/22)----------------

<ScrollViewer Height="262" HorizontalAlignment="Left" Margin="11,6,0,0"
              Name="scrollViewer1" VerticalAlignment="Top" Width="388">
  <Grid>
    <Border BorderBrush="DimGray" BorderThickness="2">                            
      <TextBlock HorizontalAlignment="Left" Name="textBlock_Main" VerticalAlignment="Top" />
    </Border>
  </Grid>
</ScrollViewer>

こっちのほうがいい気がしたから変更
これやるとスクロールバーのところは囲まれないので注意


備考