【发布时间】:2016-02-03 23:43:49
【问题描述】:
我刚刚开始学习 UWP 编程。我想在 windows 10 中写一个类似于 People 的应用程序。而且我在支持多屏幕时遇到了问题。
我有这样的布局:
<ScrollViewer Background="Black" >
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="200"/>
<RowDefinition Height="40"/>
<RowDefinition Height="60"/>
<RowDefinition Height="40"/>
<RowDefinition Height="60"/>
<RowDefinition Height="100"/>
<RowDefinition Height="100"/>
<RowDefinition Height="100"/>
</Grid.RowDefinitions>
<TextBlock
Text="CONTACT"
Margin="10, 10, 10, 10"
FontSize="25"
Foreground="White"/>
<Ellipse Grid.Row="1"
Margin="10, 20, 250, 10" >
<Ellipse.Fill>
<ImageBrush ImageSource="Assets/64.png" />
</Ellipse.Fill>
</Ellipse>
<TextBlock
Grid.Row="2"
Text="Name"
FontSize="20"
Margin="10, 0, 0, 0"
VerticalAlignment="Bottom"
Foreground="White"/>
<Grid
Grid.Row="3">
<Grid.Background>
<ImageBrush Stretch="Fill"/>
</Grid.Background>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="350" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBox
Grid.Column="0"
Margin="10, 10, 10, 10"/>
<AppBarButton
Grid.Column="1"
Foreground="White"
Icon="Edit"
HorizontalAlignment="Left"
VerticalAlignment="Center"/>
</Grid>
</Grid>
</ScrollViewer>
我在 6" 屏幕上定义了这个布局,所以我应该在最小的屏幕上定义布局或者我应该怎么做?非常感谢。
【问题讨论】:
标签: wpf xaml win-universal-app uwp windows-10-mobile