commit changes
This commit is contained in:
28
Classes/UIFunctions.cs
Normal file
28
Classes/UIFunctions.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
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();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user