2014-10-28 57 views
0

我有一個包裝面板3綁定,第二個綁定非常短,第三個綁定很長,並且在包裝面板(3綁定)我們移動到一個新行。如何留在同一行。換句話說,適合我很多可能性。我不能使用其他面板。謝謝!WrapPanel,如果我的綁定很長,打破換行

<WrapPanel x:Name="WrapPrvi" Orientation="Horizontal" Grid.Row="9" Grid.Column="1"> 
    <TextBlock TextWrapping="Wrap" Text="xxxxx " FontFamily="Times New Roman" 
      FontSize="16" /> 
    <TextBlock TextWrapping="Wrap" Text="{Binding Info.Municipality.Tijelo2}" 
      FontFamily="Times New Roman" FontSize="16" FontWeight="Bold" /> 
    <TextBox x:Name="Pream" TextWrapping="WrapWithOverflow" 
      Text="{Binding Register.Preambula, Mode=TwoWay, 
        UpdateSourceTrigger=PropertyChanged}" Height="95.862" 
      Width="702.407" FontFamily="Times New Roman" FontSize="16" /> 
</WrapPanel> 

回答

1

首先,拆除包裝:

<TextBox x:Name="Pream" 
     Text="{Binding Register.Preambula, Mode=TwoWay, 
       UpdateSourceTrigger=PropertyChanged}" Height="95.862" 
     Width="702.407" FontFamily="Times New Roman" FontSize="16" /> 

然後,如果文本沒有完全顯示出來,檢查WrapPanel的寬度是定義了一些方法,也許在網格列。

+0

好我完成了我的問題 – Ibrahim 2014-10-28 10:15:03