<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Rectangle Fill="#8686EA" Grid.Column="0" />
<Rectangle Fill="#FFFFE1" Grid.Column="1" />
<TextBlock x:Name="NickNameBlock" HorizontalAlignment="Left" Margin="10,22,0,0" TextWrapping="Wrap" Text="Nickname" VerticalAlignment="Top"/>
<TextBox x:Name="NickName" HorizontalAlignment="Left" Margin="84,10,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="109"/>
<TextBlock x:Name="ChannelBlock" HorizontalAlignment="Left" Margin="10,59,0,0" TextWrapping="Wrap" Text="Channel" VerticalAlignment="Top"/>
<TextBox x:Name="Channel" HorizontalAlignment="Left" Margin="84,47,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="109"/>
<Button x:Name="JoinButton" Content="Join" HorizontalAlignment="Left" Margin="198,47,0,0" VerticalAlignment="Top"/>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="630" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<Rectangle Fill="white" Stroke="Black" StrokeThickness="0" Grid.Column="0" Margin="10,27,0,100" />
<!--<Rectangle Fill="white" Stroke="Black" StrokeThickness="1" Grid.Column="1" Margin="6,10,71,196" />-->
<Grid Grid.Column="1" Margin="0,0,0,196">
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="30"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Rectangle Fill="#8686EA" Stroke="Black" StrokeThickness="0" Grid.Row="0" Margin="10,0,0,0" />
<Rectangle Fill="#CCCCFF" Stroke="Black" StrokeThickness="0" Grid.Row="1" Margin="10,0,0,-5" RenderTransformOrigin="0.505,0.719" Grid.RowSpan="2" />
<ListBox x:Name="listBox" Grid.Row="2" Margin="10,10,0,0" VerticalAlignment="Top" VerticalContentAlignment="Stretch" ScrollViewer.VerticalScrollBarVisibility="Visible">
<ListBox.Items>
<ListBoxItem Content="Tewl"/>
<ListBoxItem Content="Ryu"/>
<ListBoxItem Content="Clint"/>
<ListBoxItem Content="Bak3r"/>
<ListBoxItem Content="sm0kex"/>
<ListBoxItem Content="Jack"/>
<ListBoxItem Content="Bam"/>
<ListBoxItem Content="Jay"/>
<ListBoxItem Content="Tewl"/>
<ListBoxItem Content="Ryu"/>
<ListBoxItem Content="Clint"/>
<ListBoxItem Content="Bak3r"/>
<ListBoxItem Content="sm0kex"/>
<ListBoxItem Content="Jack"/>
<ListBoxItem Content="Bam"/>
<ListBoxItem Content="Jay"/>
<ListBoxItem Content="Tewl"/>
<ListBoxItem Content="Ryu"/>
<ListBoxItem Content="Clint"/>
<ListBoxItem Content="Bak3r"/>
<ListBoxItem Content="sm0kex"/>
<ListBoxItem Content="Jack"/>
<ListBoxItem Content="Bam"/>
<ListBoxItem Content="Jay"/>
</ListBox.Items>
</ListBox>
</Grid>
</Grid>
</Grid>
updated listbox in full mode updated nicklist resized still wont expand listbox列表框網格不會調整
這是reupdated克里斯W.這有整個code..my問題必須高於我真的很討厭寬/高/利潤率..
刪除您的ListBox上的硬件高度和負邊距,然後在最後一個RowDefinition上將「auto」更改爲「*」。 –
@Chris W.謝謝你的支持......我做了修改後,你修改了自上次發佈後修改...我仍然無法獲得完整的列表框屏幕,當窗口沒有最大化時[代碼] –
Set VerticalContentAlignment = Stretch/VerticalAlignment = Stretch,如果不這樣做,那麼你的佈局結構中會有更高的衝突。 –