整理控件库

This commit is contained in:
GG Z
2025-05-05 17:04:06 +08:00
parent 74532b77be
commit 3eaad7566e
283 changed files with 2156 additions and 17846 deletions

View File

@@ -5,41 +5,7 @@ namespace WPFluent.Extensions;
public static class MessageExtensions
{
private static readonly IContentDialogService ContentDialogService = new ContentDialogService();
private static readonly SnackbarService SnackbarService = new();
public static void ShowCaution(this SnackbarPresenter SnackbarPresenter, string title, string message)
{
SnackbarService.SetSnackbarPresenter(SnackbarPresenter);
SnackbarService.Show(
title,
message,
ControlAppearance.Caution,
new SymbolIcon(SymbolRegular.Question16),
SnackbarService.DefaultTimeOut);
}
public static void ShowDanger(this SnackbarPresenter SnackbarPresenter, string title, string message)
{
SnackbarService.SetSnackbarPresenter(SnackbarPresenter);
SnackbarService.Show(
title,
message,
ControlAppearance.Danger,
new SymbolIcon(SymbolRegular.Alert12),
SnackbarService.DefaultTimeOut);
}
public static void ShowInfo(this SnackbarPresenter SnackbarPresenter, string title, string message)
{
SnackbarService.SetSnackbarPresenter(SnackbarPresenter);
SnackbarService.Show(
title,
message,
ControlAppearance.Info,
new SymbolIcon(SymbolRegular.Info12),
SnackbarService.DefaultTimeOut);
}
private static readonly ContentDialogService ContentDialogService = new ContentDialogService();
public static async void ShowMessage(string content = "内容...", string title = "消息")
{
@@ -70,7 +36,7 @@ public static class MessageExtensions
string closeButtonText = "关闭")
{
return await ContentDialogService.ShowSimpleDialogAsync(
new SimpleContentDialogCreateOptions()
new SimpleContentDialogOptions()
{
Title = title,
Content = content,