Constraining a MessageDialog to be more petite

In checking out the sample Windows Store Bing app "bingPushpin," I see that this code:

private async void pushpinTapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
{
    MessageDialog dialog = new MessageDialog("Hello from Seattle.");
    await dialog.ShowAsync();
}

...causes a "MessageDialog" that spreads across the entire frame.

Surely this is not the Windows Store (nee "Metro") way of doing it. How can you specify the MessageDialog takes up no more space than necessary?

Upvotes: 1

Views: 233

Answers (2)

Marco Minerva
Marco Minerva

Reputation: 812

You can take a look to the Flyout control that is available in the Callisto Control Toolkit: https://github.com/timheuer/callisto.

Upvotes: 2

Jim O'Neil
Jim O'Neil

Reputation: 23764

The width will always occupy the client area and the height will be dependent on the amount of text that needs to be displayed.

see Designing a Message Dialog

Upvotes: 2

Related Questions