我该如何移除空间?这有什么财产吗?或者我可以只在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>
答案 0 :(得分:1)
这是有效的:填充=“ -4 0 0 0”
<RichTextBox Name="richTextBox1"
HorizontalContentAlignment="Left"
Padding="-4 0 0 0" />
答案 1 :(得分:0)
您是否尝试过设置Margin=0
或Padding = 0
?这可能会成功:)