어떻게해야합니까 TextBox
세 개의 점이있는 버튼까지 스트레칭,하지만 누군가가 많은 텍스트를 입력 할 때를 포함하지?
내 MainWindow.xaml
<Window x:Class="Foo.Bar.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:p="clr-namespace:Foo.Bar.Properties"
Title="MainWindow" Height="350" Width="525">
<Grid>
<StackPanel>
<DockPanel>
<Label Name="lblFileName" Content="File"></Label>
<TextBox Name="txbFileName"></TextBox>
<Button Name="btnOpenFileDialog" Content="..." HorizontalAlignment="Right"></Button>
</DockPanel>
<UniformGrid>
<Button Name="btnFoo" Content="Foo"></Button>
<Button Name="btnBar" Content="Bar"></Button>
</UniformGrid>
</StackPanel>
</Grid>
</Window>
어떻게 생겼는지
LastChildFill="true"
DockPanel에 설정된 TextBox를 늘리고 끝에 TextBox를 추가 하려면
Btw. DockPanel을 사용 DockPanel.Dock="Right"
하는 경우 HorizontalAlignment="Right"
.
<Grid>
<StackPanel>
<DockPanel LastChildFill="True">
<Label Name="lblFileName" Content="File"></Label>
<Button Name="btnOpenFileDialog" Content="..." DockPanel.Dock="Right"></Button>
<TextBox Name="txbFileName"></TextBox>
</DockPanel>
<UniformGrid>
<Button Name="btnFoo" Content="Foo"></Button>
<Button Name="btnBar" Content="Bar"></Button>
</UniformGrid>
</StackPanel>
</Grid>
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다