29 lines
736 B
C#
29 lines
736 B
C#
using Microsoft.UI.Xaml;
|
|
using Microsoft.UI.Xaml.Controls;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Windows.Foundation.Metadata;
|
|
|
|
namespace APIToolkit.Classes
|
|
{
|
|
public class UIFunctions
|
|
{
|
|
public static void ShowError(XamlRoot parent, string message)
|
|
{
|
|
ContentDialog ThisDialog = new ContentDialog();
|
|
|
|
ThisDialog.XamlRoot = parent;
|
|
ThisDialog.Title = "Error";
|
|
ThisDialog.PrimaryButtonText = "Dismiss";
|
|
ThisDialog.Content = message;
|
|
ThisDialog.DefaultButton = ContentDialogButton.Primary;
|
|
|
|
var result = ThisDialog.ShowAsync();
|
|
|
|
}
|
|
}
|
|
}
|