Windows Phone 7 上倾斜的网络浏览器

发布于 2024-10-09 23:46:53 字数 1053 浏览 0 评论 0原文

我正在开发 Windows Phone 7 模拟器。我有一个可以导航到本地主机的网络浏览器。所以我面临的问题是,当我将 Windows Phone 7 模拟器向右倾斜 90% 时,屏幕却没有。对于如何做到这一点,有什么建议吗?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace DSP
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
        }

        private void ContentPanel_Loaded(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("Loading website.  This might take a few seconds...");
            webBrowser1.Navigate(new Uri("http://localhost/Liweiyi_fyp_082648y/homepage.html", UriKind.Absolute));
        }

        private void webBrowser1_Loaded(object sender, RoutedEventArgs e)
        {

        }
    }
}

i'm working on a windows phone 7 emulator. I have a web browser which navigates to local host. So my problem i faced was that when i tilt the windows phone 7 emulator 90% right, the screen doesn't. Could there be any advice on how to do so?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace DSP
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
        }

        private void ContentPanel_Loaded(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("Loading website.  This might take a few seconds...");
            webBrowser1.Navigate(new Uri("http://localhost/Liweiyi_fyp_082648y/homepage.html", UriKind.Absolute));
        }

        private void webBrowser1_Loaded(object sender, RoutedEventArgs e)
        {

        }
    }
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

花开半夏魅人心 2024-10-16 23:46:53

检查您的 xaml 中的 SupportedOrientations 是 PortraitOrLandscape。

另请检查您的模拟器是否因硬件键盘模拟而锁定方向。如果您不确定如何解决该问题,请重新启动它。

Check your SupportedOrientations is PortraitOrLandscape in your xaml.

Also check your emulator isn't orientation locked due to hardware keybaord emulation. Restart it if you're not sure how to fix that.

多情癖 2024-10-16 23:46:53

我相信您正在寻找如何处理方向手机上有什么变化

您希望在 .xaml 中更改相应页面的以下内容 - 最有可能是 MainPage.xaml:

alt text

更改要阅读的突出显示的行

SupportedOrientations="PortraitOrLandscape"

如果信息不够,请参阅 一篇有用的博文

I believe you're looking for how to handle orientation changes on the phone?

You're looking to change the following in the .xaml for the appropriate page - most likely MainPage.xaml:

alt text

Change the highlighted line to read

SupportedOrientations="PortraitOrLandscape"

And in case that wasn't enough information, here's a helpful blogpost.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文