Apoorva
Apoorva

Reputation: 1047

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 :)Portrait Mode Landscape mode with text aligned just the same as in portrait mode

Upvotes: 0

Views: 670

Answers (1)

Kris Selbekk
Kris Selbekk

Reputation: 7614

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

Upvotes: 3

Related Questions