1

http://i.imgur.com/dGeFu.png

how can i remove space? is there any property for this? or maybe i can do it only manually in xaml? here is all 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>

docxx
  • 95
  • 1
  • 4
  • 12
  • 1
    possible duplicate of [WPF: How to make RichTextBox look like TextBlock?](http://stackoverflow.com/questions/5820578/wpf-how-to-make-richtextbox-look-like-textblock) – Chris Shain Mar 09 '12 at 20:53
  • 1
    Are you sure this is a space and not padding left of the control? – Khan Mar 09 '12 at 20:53

2 Answers2

1

This is works: Padding="-4 0 0 0"

<RichTextBox Name="richTextBox1"
                     HorizontalContentAlignment="Left"
                     Padding="-4 0 0 0" />
asktomsk
  • 2,223
  • 14
  • 22
0

Have you tried setting the Margin=0 or Padding = 0? That might do the trick :)

Justin Pihony
  • 62,016
  • 17
  • 131
  • 162