所以我有一个应用程序,我想将它升级到Windows 8.1,所以它有最新版本,我得到所有的更新/工具。当我尝试创建一个时,它很顺利,但一旦我开始在手机上调试(640 XL),它只显示应用程序的一部分。
我认为这是因为在Windows 8.0中我可以选择扩展120%,尽管我不太确定。
我有点卡在这里,我尝试了所有选项,但它似乎没有用。 这里有2张图片向您展示我的意思:http://imgur.com/a/s9ZZO。
<Page
x:Class="App11.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App11"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid Background="#FF002E72" HorizontalAlignment="Left" Height="640" VerticalAlignment="Top" Width="400" Margin="0,0.333,0,-0.333">
<ScrollViewer>
<Grid HorizontalAlignment="Left" Height="638" VerticalAlignment="Top" Width="401">
<Rectangle Fill="Black" HorizontalAlignment="Left" Height="21" Stroke="Black" VerticalAlignment="Top" Width="483" Margin="0,127,-3,0"/>
<TextBlock x:Name="textBlock1_Copy2" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Margin="222,575,0,0" Foreground="White">
<Span>
<Run Text="Ongestructureerd en onvoorspelbaar"/>
</Span>
<LineBreak/>
<Span>
<Run Text="Onbekend terrein over meerdere domeinen"/>
</Span>
</TextBlock>
<TextBlock x:Name="textBlock1_Copy3" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Margin="228,178,0,0">
<Span Foreground="White">
<Run Text="Gestructureerd en "/>
</Span>
<LineBreak/>
<Span Foreground="White">
<Run Text="voorspelbaar"/>
</Span>
</TextBlock>
<TextBlock x:Name="textBlock1_Copy4" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Margin="228,293,0,0" Height="117">
<Span Foreground="White">
<Run Text="Gestructureerd en onvoorspelbaar of ongestructureerd en voorspelbaar "/>
</Span>
<LineBreak/>
</TextBlock>
<TextBlock x:Name="textBlock1_Copy5" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Margin="228,433,0,0" Foreground="White" Height="120">
<Span>
<Run Text="Ongestructureerd en onvoorspelbaar"/>
</Span>
<LineBreak/>
<Span>
<Run Text="Onbekend"/>
</Span>
<Span>
<Run Text=" "/>
</Span>
<Span>
<Run Text="terrein"/>
</Span>
<Span>
<Run Text=" "/>
</Span>
<Span>
<Run Text="binnen"/>
</Span>
<LineBreak/>
<Span>
<Run Text="eigen"/>
</Span>
<Span>
<Run Text=" "/>
</Span>
<Span>
<Run Text="domein"/>
</Span>
</TextBlock>
<Image x:Name="image1" HorizontalAlignment="Left" Height="100" VerticalAlignment="Top" Width="100" Margin="92,153,0,0" Source="/Assets/niet-complex.png"/>
<Image x:Name="image1_Copy" HorizontalAlignment="Left" Height="100" VerticalAlignment="Top" Width="100" Margin="92,293,0,0" Source="/Assets/matig-complex.png" CacheMode="BitmapCache"/>
<Image x:Name="image1_Copy2" HorizontalAlignment="Left" Height="100" VerticalAlignment="Top" Width="100" Margin="92,433,0,0" Source="/Zeer-complex.png"/>
<TextBlock x:Name="textBlock1" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Margin="110,200,0,0" Width="100">
<Span Foreground="#FFFFE699">
<Run Text="Niet"/>
</Span>
<Span Foreground="Black">
<Run Text=" "/>
</Span>
<Span Foreground="#FFFFE699">
<Run Text="complex"/>
</Span>
</TextBlock>
<TextBlock x:Name="textBlock1_Copy" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Margin="110,340,0,0" Width="100">
<Span Foreground="#FFFFE699">
<Run Text="Matig"/>
</Span>
<Span Foreground="Black">
<Run Text=" "/>
</Span>
<Span Foreground="#FFFFE699">
<Run Text="complex"/>
</Span>
</TextBlock>
<TextBlock x:Name="textBlock1_Copy1" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Margin="110,480,0,0" RenderTransformOrigin="0.504,0.37" Width="89">
<Span Foreground="#FFFFE699">
<Run Text="Zeer"/>
</Span>
<Span Foreground="Black">
<Run Text=" "/>
</Span>
<Span Foreground="#FFFFE699">
<Run Text="complex"/>
</Span>
</TextBlock>
<Image x:Name="image3" HorizontalAlignment="Left" Height="100" VerticalAlignment="Top" Width="100" Margin="92,575,0,0" Stretch="Fill" Source="/Assets/uiterst-complex.png"/>
<TextBlock x:Name="textBlock1_Copy6" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Margin="110,622,0,0" RenderTransformOrigin="0.63,0.259" Width="100">
<Span Foreground="#FFFFE699">
<Run Text="Uiterst"/>
</Span>
<Span Foreground="Black">
<Run Text=" "/>
</Span>
<Span Foreground="#FFFFE699">
<Run Text="complex"/>
</Span>
</TextBlock>
</Grid>
</ScrollViewer>
</Grid>
</Page>
答案 0 :(得分:0)
检查您的XAML
,在根元素上设置固定Height
并修复Width
。
使用下一个链接作为参考:
https://msdn.microsoft.com/en-us/library/windows/apps/jj207025%28v=vs.105%29.aspx
https://msdn.microsoft.com/en-us/library/windows/apps/jj207042%28v=vs.105%29.aspx
有一个关于MVA&#34; XAML Deep Dive for Windows & Windows Phone Apps Jump Start&#34;的免费视频课程。
答案 1 :(得分:0)
更改网格声明:
<Grid Background="#FF002E72" HorizontalAlignment="Stretch"VerticalAlignment="Stretch">
现在它将获得所有可用空间(垂直和水平)。 如果你想要自适应布局,你应该使用拉伸。添加到控件固定大小不会允许您设计自适应/可扩展设计(在您的情况下)。