繁体   English   中英

Windows Phone芒果选择器

[英]Windows Phone Mango choosers

我使用各种选择器时遇到问题。 当我启动其中一个它应该返回到我的应用程序时,我得到的是一个“恢复”屏幕,其中进度条无限制地动画。 按下或开始按钮什么都不做,一段时间后它会进入主屏幕。 此应用程序的推出再次缓慢。

选择器有问题

这发生在模拟器和移动设备上。

使用无法返回的选择器的我的类的一个示例是:

public partial class Add : PhoneApplicationPage
    {
        GameInviteTask gameInviteTask;

        public Add()
        {
            InitializeComponent();
            gameInviteTask = new GameInviteTask();
            gameInviteTask.Completed += new EventHandler<TaskEventArgs>(gameInviteTask_Completed);
        }

        private void TextBox_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            try
            {
                gameInviteTask.SessionId = "<my session id>";
                gameInviteTask.Show();
            }
            catch (System.InvalidOperationException ex)
            {
                MessageBox.Show("An error occurred when choosing an email contact.");
            }
        }

        void gameInviteTask_Completed(object sender, TaskEventArgs e)
        {
            switch (e.TaskResult)
            {
                //Game logic for when the invite was sent successfully
                case TaskResult.OK:
                    MessageBox.Show("Game invitation sent.");
                    break;

                //Game logic for when the invite is cancelled by the user
                case TaskResult.Cancel:
                    MessageBox.Show("Game invitation cancelled.");
                    break;

                // Game logic for when the invite could not be sent
                case TaskResult.None:
                    MessageBox.Show("Game invitation could not be sent.");
                    break;
            }
        }

    } 

所有选择器都会发生这种情况。 我使用主页面使用导航服务导航到此页面。

可能是什么问题呢?!

我发现了问题......

不幸的是,我尝试一切时没有尝试过的唯一一件事就是从运行Tap事件的文本框中删除IsReadOnly。

所以这是一个微软的bug:/

Windows Phone 7.1: 当您从具有IsReadOnly True的文本框的Tap事件中运行选择器时,选择器不起作用。

我会留在这里,这样可以帮助别人。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM