I started a project in Blend for Visual Studio 2013 generating the message by dialog. In the initial screen I put an unnamed button with the inscription "Test":
Afterthat,IselectedthebuttonandsearchedthebuttonpropertiesfortheeventsthatIcanputonthebutton.Bydouble-clicking"Click", Blend created the event for me as shown below:
Finally,mysourcelookedlikethis:
MainPage.xaml.cs
usingSystem;usingSystem.Collections.Generic;usingSystem.IO;usingSystem.Linq;usingSystem.Runtime.InteropServices.WindowsRuntime;usingWindows.Foundation;usingWindows.Foundation.Collections;usingWindows.UI.Xaml;usingWindows.UI.Xaml.Controls;usingWindows.UI.Xaml.Controls.Primitives;usingWindows.UI.Xaml.Data;usingWindows.UI.Xaml.Input;usingWindows.UI.Xaml.Media;usingWindows.UI.Xaml.Navigation;usingWindows.UI.Popups;//Nãoesqueçadeadicionaresteusing//TheBlankPageitemtemplateisdocumentedathttp://go.microsoft.com/fwlink/?LinkId=234238namespaceApp1{///<summary>///AnemptypagethatcanbeusedonitsownornavigatedtowithinaFrame.///</summary>publicsealedpartialclassMainPage:Page{publicMainPage(){this.InitializeComponent();}privateasyncvoidButton_Click(objectsender,Windows.UI.Xaml.RoutedEventArgse){//Aquicrioumamensagemdedialogeaexibo.MessageDialogdialog=newMessageDialog("Teste", "Teste Dialog");
await dialog.ShowAsync();
}
}
}
The result was this: