Developer, Former MVP, now at Microsoft - Best of 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
I am sharing a class I use for both my Windows Phone 8 and Windows Store app projects.
The solution is what the requirements above outlined: a single code file with a MessageBox class that you can drop in your project, regardless of whether it targets Windows Phone 8, or Windows 8 Store apps or both. Just call any of its static Show functions using await and dependent on the overload check the return type to see which button the user chose.
// example from http://www.danielmoth.com/Blog/GuideBeginShowMessageBox-Wrapper.aspx
if (await MyMessageBox.Show("my message", "my caption", "ok, got it", "that sucks")
// Do something
The class can be downloaded from the bottom of my older blog post.
© Copyright 2004-2017, Daniel Moth -
Powered by newtelligence dasBlog 2.3.9074.18820
Page rendered Saturday, 29 April 2017 06:34:29 (Pacific Daylight Time, UTC-07:00)