【发布时间】:2015-03-17 00:05:45
【问题描述】:
我在我的 wp 8.1 应用程序 (XAML/C#) 中遇到了一些元素的定位问题。我已经读过要创建灵活的布局,我应该使用网格控件。 好吧,这是我在页面元素中的 XAML:
<Grid Style="{StaticResource LayoutGridCreateProfilStyle}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Rectangle Grid.Row="0" Height="60" Fill="#F3A8E4F9" ></Rectangle>
<Rectangle Grid.Row="1" Height="40" Fill="Gray"></Rectangle>
<ListBox Grid.Row="2" Height="420" Background="Transparent"/>
<Canvas Grid.Row="3">
<Ellipse Height="100" Margin="0,0,0,0" Width="100" Fill="Black" Canvas.Left="152" Canvas.Top="10"></Ellipse>
</Canvas>
</Grid>
在 XAML 设计器中,我实际上看到了我想要的内容,如下所示:
这是在我的诺基亚 Lumia 925 上的外观:
如您所见,椭圆被切割了,我真的不知道如何按应有的方式放置它,并且实际出现在设计器视图中。 也许有人可以帮助我?
提前致谢!
【问题讨论】:
标签: c# xaml responsive-design windows-phone-8.1 ellipse