优化更新

This commit is contained in:
GG Z
2025-02-10 20:53:40 +08:00
parent 83b846f15f
commit 9696128f03
62 changed files with 2567 additions and 1608 deletions

View File

@@ -3,7 +3,9 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Windows.Markup;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
@@ -13,6 +15,7 @@ using Sai.RvKits;
using Wpf.Ui;
using Wpf.Ui.Controls;
using Wpf.Ui.Extend.Controls;
using Wpf.Ui.Violeta.Controls;
namespace WpfApp
{
@@ -28,15 +31,20 @@ namespace WpfApp
[RelayCommand]
private void ButtonClick()
{
snackbarService = new SnackbarService();
snackbarService.SetSnackbarPresenter(SnackbarPresenter);
snackbarService.Show(
"消息",
"Test",
snackbarAppearance,
new SymbolIcon(SymbolRegular.Fluent24),
TimeSpan.FromSeconds(snackbarTimeout)
);
//snackbarService = new SnackbarService();
//snackbarService.SetSnackbarPresenter(SnackbarPresenter);
//snackbarService.Show(
// "消息",
// "Test",
// snackbarAppearance,
// new SymbolIcon(SymbolRegular.Fluent24),
// TimeSpan.FromSeconds(snackbarTimeout)
//);
Toast.Information("I am information message");
Toast.Error("I am error message");
Toast.Success("I am success message");
Toast.Warning("I am warning message");
Toast.Show(owner: null!, "I am any message", new ToastConfig());
}
[RelayCommand]
@@ -176,6 +184,7 @@ namespace WpfApp
public List<Student> Students { get; set; } = [];
}
class Student
{
public int ID { get; set; }

View File

@@ -167,6 +167,7 @@
MinHeight="30"
Padding="5"
ItemsSource="{Binding Items}" />-->
</ex:AutoGrid>
<ui:SnackbarPresenter
x:Name="SnackbarPresenter"

View File

@@ -12,10 +12,10 @@
<None Remove="Fonts\Segoe Fluent Icons.ttf" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Common" Version="8.3.2" />
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.3.2" />
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.3.2" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageReference Include="CommunityToolkit.Common" Version="8.4.0" />
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.4.0" />
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.4.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />