Interaction logic for MessageBoxInput.xaml
Esempio n. 1
0
        /// <summary>
        ///     Show a Metro Input Message Box
        /// </summary>
        /// <param name="title">The title of the Message Box.</param>
        /// <param name="message">The message to display inside the Message Box.</param>
        /// <param name="defaultText">The default text to show in the input box.</param>
        /// <param name="placeholder">The placeholder text to put in the Input Box.</param>
        /// <returns>The string the user entered.</returns>
        public static string Show(string title, string message, string defaultText, string placeholder)
        {
            var dialog = new MessageBoxInput(title, message, placeholder, null, defaultText);
            dialog.ShowDialog();

            return dialog.Result;
        }
Esempio n. 2
0
        /// <summary>
        ///     Show a Metro Input Message Box
        /// </summary>
        /// <param name="title">The title of the Message Box.</param>
        /// <param name="message">The message to display inside the Message Box.</param>
        /// <returns>The string the user entered.</returns>
        public static string Show(string title, string message)
        {
            var dialog = new MessageBoxInput(title, message, "", null, "");
            dialog.ShowDialog();

            return dialog.Result;
        }