【发布时间】:2015-08-20 20:28:18
【问题描述】:
我需要一些帮助来解决这个问题:
我有纵向视图的页面。顶部 1/3 字段为 MediaElement 或 Image 保留,底部 2/3:有按钮和文本块。
我需要这样做:
- 如果元素被点击(完成)
- 暴力旋转手机视图(完成)
- 调整整个页面的宽度和高度 MediaElement 和 Image,而不刷新源
谢谢你的帮助
【问题讨论】:
标签: c# xaml windows-phone-8 windows-phone-8.1
我需要一些帮助来解决这个问题:
我有纵向视图的页面。顶部 1/3 字段为 MediaElement 或 Image 保留,底部 2/3:有按钮和文本块。
我需要这样做:
谢谢你的帮助
【问题讨论】:
标签: c# xaml windows-phone-8 windows-phone-8.1
只需提供您的 UI 元素名称并填写“PhoneApplicationPage_OrientationChanged”方法。 就像这样:
<Image x:Name="IndexImage"></Image> //every Image needs an source so this code does not work
而c#中的方法是这样的:
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e){
if ((e.Orientation & PageOrientation.Portrait) == (PageOrientation.Portrait))
{
IndexImage.height = 100; //for example
}
else
{
IndexImage.height = 50; //for example
}
【讨论】: