0

我有消息框,在不同的场景中显示不同的消息。我的问题是,在纵向模式下,消息正文很好,但在横向模式下,即使有很多空间,消息正文也会被包装并以多行显示。为什么不完全传播消息文本???这是 WP7 中的一个已知问题还是本机行为?为了让大家理解我说的问题,我附上两张横向和纵向模式的消息框图片。我采用了一个带有非常长的消息文本的消息框进行测试。

这是消息框的代码:

void btnLike_Click(object sender, RoutedEventArgs e)
    {
        msgPrompt.Hide();
        MessageBoxResult result = new MessageBoxResult();
        result=MessageBox.Show("Thank You for your feedback!! It was nice to know that you liked this app, We will be back with a more amazing features!!! Upgrades will be available soon!!!", "Feedback", MessageBoxButton.OK);
        if (result == MessageBoxResult.OK)
        {
            Game game = new Game();
            game.Exit();
        }
    }

请查看并以代码形式(如果有)提供您的评论或修复。

谢谢你,阿普尔瓦 :)人像模式 横向模式,文本对齐方式与纵向模式相同

4

1 回答 1

3

Although this might be the standard behavior (it looks like it is), you can quite simply create your own custom control to achieve what you'd like to do. I made my first one the other day, and it was quite easy really.

For more information about how to do the same, you can look at some of these links:

http://www.windowsphonegeek.com/articles/Creating-a-WP7-Custom-Control-in-7-Steps

http://www.windowsphonegeek.com/articles/7-Mistakes-Developer-make-when-implementing-Windows-Phone-Custom-Controls

Happy coding :-)

于 2012-07-25T16:06:46.307 回答