2012-03-09 4 views
1

http://i.imgur.com/dGeFu.pngrichtextBoxからスペースを削除する方法

スペースを削除するにはどうすればよいですか?これにはどんなプロパティがありますか?または多分私は手動でxamlでそれを行うことができますか?ここにすべてのXAMLは次のとおりです。

<Window x:Class="WPFnotatnik.MainWindow" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="MainWindow" Height="350" Width="525"> 
<Grid> 
    <Grid.RowDefinitions> 
     <RowDefinition Height="Auto"/> 
     <RowDefinition/> 
    </Grid.RowDefinitions> 
    <Menu Grid.Row="0"> 
     <MenuItem Header="File"/> 
     <MenuItem Header="Another"/> 
    </Menu> 
    <Grid x:Name="contentGrid" Grid.Row="1"> 
     <RichTextBox Name="richTextBox1" HorizontalContentAlignment="Left" /> 
    </Grid> 
</Grid> 

+1

の可能重複[WPF:?どのようにリッチテキストボックスがTextBlockのように見えるようにする](HTTP: //stackoverflow.com/questions/5820578/wpf-how-to-make-richtextbox-look-like-textblock) –

+1

これは空白で、コントロールの左にパディングしていないのですか? – Khan

答えて

1

これは作品である:パディング=」-4 0 0 0"

<RichTextBox Name="richTextBox1" 
        HorizontalContentAlignment="Left" 
        Padding="-4 0 0 0" /> 
0

あなたはMargin=0Padding = 0を設定しようとしたことがありますか?それはトリックを行う可能性があります:)

関連する問題