简体   繁体   中英

Message Box body display in Landscape mode in multiple lines

I have message box that is displayed with different messages on different scenarios. My problem is that in portrait mode the message body is fine but in landscape even though there is a lot of space the message body gets wrapped and gets displayed in multiple lines. Why not spread the message text completely??? Is this a known issue in WP7 or is it the native behaviour? To make you all understand the problem am talking about, am attaching 2 pictures of message boxes in Landscape and portrait mode. I have taken a message box with really lengthy message text for testing.

Here is the code for the message box:

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();
        }
    }

Please do have a look and provide your comments or fixes in form of code (If any).

Thank you, Apoorva :) 人像模式横向模式,文本对齐方式与纵向模式相同

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 :-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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