From f8c224048efadf490c6252d957d10ea14a797fd5 Mon Sep 17 00:00:00 2001
From: Lightczx <1686188646@qq.com>
Date: Fri, 21 Jun 2024 17:20:48 +0800
Subject: [PATCH] refactor
---
src/Snap.Hutao/Snap.Hutao/App.xaml | 44 +--
.../Snap.Hutao/Control/Media/Bgra32.cs | 64 ----
.../Snap.Hutao/Control/Media/Hsla32.cs | 32 --
.../Snap.Hutao/Control/Media/Rgba32.cs | 150 ---------
.../Imaging}/SoftwareBitmapExtension.cs | 3 +-
.../NotifyIcon/NotifyIconContextMenu.xaml | 9 +-
.../Core/Windowing/XamlWindowController.cs | 11 +-
src/Snap.Hutao/Snap.Hutao/GuideWindow.xaml | 4 +-
.../Snap.Hutao/IdentifyMonitorWindow.xaml | 4 +-
.../Snap.Hutao/LaunchGameWindow.xaml | 8 +-
.../Converter/AchievementIconConverter.cs | 2 +-
.../Converter/AssociationTypeIconConverter.cs | 2 +-
.../Metadata/Converter/AvatarCardConverter.cs | 2 +-
.../Converter/AvatarIconCircleConverter.cs | 2 +-
.../Metadata/Converter/AvatarIconConverter.cs | 2 +-
.../Converter/AvatarNameCardPicConverter.cs | 2 +-
.../Converter/AvatarSideIconConverter.cs | 2 +-
.../DescriptionsParametersDescriptor.cs | 2 +-
.../Converter/ElementNameIconConverter.cs | 2 +-
.../Converter/EmotionIconConverter.cs | 2 +-
.../Metadata/Converter/EquipIconConverter.cs | 2 +-
.../Converter/GachaAvatarIconConverter.cs | 2 +-
.../Converter/GachaAvatarImgConverter.cs | 2 +-
.../Converter/GachaEquipIconConverter.cs | 2 +-
.../Metadata/Converter/ItemIconConverter.cs | 2 +-
.../Converter/MonsterIconConverter.cs | 2 +-
.../PropertiesParametersDescriptor.cs | 2 +-
.../Converter/QualityColorConverter.cs | 4 +-
.../Metadata/Converter/QualityConverter.cs | 2 +-
.../Metadata/Converter/RelicIconConverter.cs | 2 +-
.../Metadata/Converter/SkillIconConverter.cs | 2 +-
.../Converter/WeaponTypeIconConverter.cs | 2 +-
.../BackgroundImage/BackgroundImageService.cs | 5 +-
.../ScreenCapture/GameScreenCaptureSession.cs | 2 +-
.../Navigation/INavigationViewAccessor.cs | 2 +-
.../Service/Navigation/NavigationService.cs | 2 +-
src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj | 156 ++-------
src/Snap.Hutao/Snap.Hutao/UI/Bgra32.cs | 37 +++
src/Snap.Hutao/Snap.Hutao/UI/ColorHelper.cs | 105 ++++++
.../Composition}/CompositionExtension.cs | 3 +-
src/Snap.Hutao/Snap.Hutao/UI/Hsla32.cs | 12 +
src/Snap.Hutao/Snap.Hutao/UI/Rgba32.cs | 44 +++
.../{Control/Media => UI}/Rgba64.cs | 2 +-
.../{Control => UI/Xaml}/BindingProxy.cs | 2 +-
.../AutoSuggestTokenBox.cs | 2 +-
.../SearchToken.cs | 2 +-
.../SearchTokenKind.cs | 2 +-
.../IScopedPageScopeReferenceTracker.cs | 2 +-
.../Xaml}/Control/Image/CachedImage.cs | 4 +-
.../Xaml}/Control/Image/CachedImage.xaml | 10 +-
.../Xaml}/Control/Image/CompositionImage.cs | 8 +-
.../{ => UI/Xaml}/Control/Image/Gradient.cs | 3 +-
.../Xaml}/Control/Image/GradientDirection.cs | 2 +-
.../Xaml}/Control/Image/GradientStop.cs | 2 +-
.../{ => UI/Xaml}/Control/Image/MonoChrome.cs | 5 +-
.../Xaml/Control}/InfoBarTemplateSelector.cs | 4 +-
.../Layout/UniformStaggeredColumnLayout.cs | 2 +-
.../Control/Layout/UniformStaggeredItem.cs | 2 +-
.../Control/Layout/UniformStaggeredLayout.cs | 3 +-
.../Layout/UniformStaggeredLayoutState.cs | 8 +-
.../{ => UI/Xaml}/Control/Layout/WrapItem.cs | 2 +-
.../Xaml}/Control/Layout/WrapLayout.cs | 3 +-
.../Xaml}/Control/Layout/WrapLayoutState.cs | 4 +-
.../Xaml/Control/LayoutSwitch.xaml} | 12 +-
.../Xaml/Control/LayoutSwitch.xaml.cs} | 28 +-
.../{ => UI/Xaml}/Control/Loading.cs | 23 +-
.../{ => UI/Xaml}/Control/Loading.xaml | 10 +-
.../{ => UI/Xaml}/Control/Panel/EqualPanel.cs | 2 +-
.../Control/Panel/HorizontalEqualPanel.cs | 2 +-
.../Xaml}/Control/Panel/UniformPanel.cs | 2 +-
.../{ => UI/Xaml}/Control/ScopedPage.cs | 2 +-
.../ScopedPageScopeReferenceTracker.cs | 2 +-
.../Control/SizeRestrictedContentControl.cs | 2 +-
.../TextBlock}/DescriptionTextBlock.cs | 37 +--
.../TextBlock}/HtmlDescriptionTextBlock.cs | 31 +-
.../Syntax/MiHoYo/MiHoYoColorKind.cs | 2 +-
.../Syntax/MiHoYo/MiHoYoColorTextSyntax.cs | 2 +-
.../Syntax/MiHoYo/MiHoYoItalicTextSyntax.cs | 2 +-
.../Syntax/MiHoYo/MiHoYoPlainTextSyntax.cs | 2 +-
.../Syntax/MiHoYo/MiHoYoRootSyntax.cs | 2 +-
.../Syntax/MiHoYo/MiHoYoSyntaxKind.cs | 2 +-
.../Syntax/MiHoYo/MiHoYoSyntaxNode.cs | 2 +-
.../Syntax/MiHoYo/MiHoYoSyntaxTree.cs | 2 +-
.../Syntax/MiHoYo/MiHoYoXmlElementSyntax.cs | 2 +-
.../Control/TextBlock}/Syntax/SyntaxNode.cs | 2 +-
.../Control/TextBlock}/Syntax/TextPosition.cs | 2 +-
.../{ => UI/Xaml}/Control/Theme/Card.xaml | 0
.../{ => UI/Xaml}/Control/Theme/Color.xaml | 0
.../{ => UI/Xaml}/Control/Theme/ComboBox.xaml | 0
.../Xaml}/Control/Theme/Converter.xaml | 0
.../Xaml}/Control/Theme/CornerRadius.xaml | 0
.../Xaml}/Control/Theme/FlyoutStyle.xaml | 0
.../Xaml}/Control/Theme/FontStyle.xaml | 0
.../{ => UI/Xaml}/Control/Theme/Glyph.xaml | 0
.../Xaml}/Control/Theme/InfoBarOverride.xaml | 0
.../Control/Theme/ItemsPanelTemplate.xaml | 0
.../Xaml}/Control/Theme/KnownColors.cs | 2 +-
.../Xaml}/Control/Theme/NumericValue.xaml | 0
.../Xaml}/Control/Theme/PageOverride.xaml | 0
.../Xaml}/Control/Theme/PivotOverride.xaml | 0
.../Xaml}/Control/Theme/ScrollViewer.xaml | 0
.../Control/Theme/SegmentedOverride.xaml | 4 +-
.../Xaml}/Control/Theme/SettingsStyle.xaml | 0
.../Xaml}/Control/Theme/SystemColors.cs | 2 +-
.../Xaml}/Control/Theme/ThemeHelper.cs | 2 +-
.../Xaml}/Control/Theme/Thickness.xaml | 0
.../Control/Theme/TransitionCollection.xaml | 0
.../{ => UI/Xaml}/Control/Theme/Uri.xaml | 0
.../Xaml}/Control/Theme/WindowOverride.xaml | 0
.../Xaml/Data}/DependencyValueConverter.cs | 20 +-
.../Xaml/Data}/ValueConverter.cs | 20 +-
.../Xaml}/IXamlElementAccessor.cs | 2 +-
.../Xaml}/Markup/BitmapIconExtension.cs | 2 +-
.../Xaml}/Markup/FontIconExtension.cs | 2 +-
.../Xaml}/Markup/Int32Extension.cs | 2 +-
.../Xaml}/Markup/ResourceStringExtension.cs | 14 +-
.../Xaml}/Markup/UInt32Extension.cs | 2 +-
.../Markup/XamlServiceProviderExtension.cs | 2 +-
.../Snap.Hutao/View/Card/AchievementCard.xaml | 6 +-
.../Snap.Hutao/View/Card/DailyNoteCard.xaml | 4 +-
.../View/Card/GachaStatisticsCard.xaml | 18 +-
.../Snap.Hutao/View/Card/LaunchGameCard.xaml | 14 +-
.../View/Card/Primitive/CardBlock.xaml | 4 +-
.../Control/AnnouncementContentViewer.xaml.cs | 2 +-
.../View/Control/BaseValueSlider.xaml | 6 +-
.../View/Control/DescParamComboBox.xaml | 10 +-
.../Snap.Hutao/View/Control/Elevation.xaml | 6 +-
.../View/Control/HutaoStatisticsCard.xaml | 14 +-
.../Snap.Hutao/View/Control/ItemIcon.xaml | 10 +-
.../Control/LaunchGameResourceExpander.xaml | 4 +-
.../Snap.Hutao/View/Control/LoadingView.xaml | 16 +-
.../View/Control/LoadingView.xaml.cs | 2 +-
.../View/Control/LoadingViewSlim.xaml | 7 +-
.../View/Control/LoadingViewSlim.xaml.cs | 2 +-
.../View/Control/RateDeltaTextBlock.cs | 1 -
.../Snap.Hutao/View/Control/SkillPivot.xaml | 4 +-
.../View/Control/StatisticsCard.xaml | 36 +--
.../View/Control/StatisticsSegmented.xaml | 6 +-
.../Int32ToGradientColorConverter.cs | 2 +-
.../Converter/PanelSelectorModeConverter.cs | 10 +-
.../BackdropTypeToOpacityConverter.cs | 2 +-
.../UInt32ToGradientColorConverter.cs | 2 +-
.../Converter/VisibilityToObjectConverter.cs | 2 +-
.../AchievementArchiveCreateDialog.xaml | 10 +-
.../View/Dialog/AchievementImportDialog.xaml | 26 +-
.../View/Dialog/CultivateProjectDialog.xaml | 12 +-
.../CultivatePromotionDeltaBatchDialog.xaml | 18 +-
.../Dialog/CultivatePromotionDeltaDialog.xaml | 12 +-
.../Dialog/DailyNoteNotificationDialog.xaml | 16 +-
.../View/Dialog/DailyNoteWebhookDialog.xaml | 10 +-
.../View/Dialog/GachaLogImportDialog.xaml | 20 +-
.../Dialog/GachaLogRefreshProgressDialog.xaml | 4 +-
.../View/Dialog/GachaLogUrlDialog.xaml | 10 +-
.../View/Dialog/GeetestCustomUrlDialog.xaml | 24 +-
.../View/Dialog/HutaoPassportLoginDialog.xaml | 12 +-
.../Dialog/HutaoPassportRegisterDialog.xaml | 18 +-
.../HutaoPassportResetPasswordDialog.xaml | 18 +-
.../Dialog/HutaoPassportUnregisterDialog.xaml | 18 +-
.../Dialog/LaunchGameAccountNameDialog.xaml | 10 +-
.../LaunchGameConfigurationFixDialog.xaml | 10 +-
.../LaunchGamePackageConvertDialog.xaml | 6 +-
.../View/Dialog/ReconfirmDialog.xaml | 14 +-
...alAbyssUploadRecordHomaNotLoginDialog.xaml | 12 +-
.../UpdatePackageDownloadConfirmDialog.xaml | 10 +-
.../Snap.Hutao/View/Dialog/UserDialog.xaml | 18 +-
.../View/Dialog/UserQRCodeDialog.xaml | 6 +-
.../Snap.Hutao/View/Guide/GuideView.xaml | 84 ++---
.../View/Helper/DeferContentLoader.cs | 2 +-
.../Snap.Hutao/View/InfoBarView.xaml | 8 +-
.../Snap.Hutao/View/InfoBarView.xaml.cs | 6 -
src/Snap.Hutao/Snap.Hutao/View/MainView.xaml | 54 ++--
.../Snap.Hutao/View/Page/AchievementPage.xaml | 62 ++--
.../View/Page/AchievementPage.xaml.cs | 2 +-
.../View/Page/AnnouncementPage.xaml | 24 +-
.../View/Page/AnnouncementPage.xaml.cs | 2 +-
.../View/Page/AvatarPropertyPage.xaml | 109 ++++---
.../View/Page/AvatarPropertyPage.xaml.cs | 2 +-
.../Snap.Hutao/View/Page/CultivationPage.xaml | 83 ++---
.../View/Page/CultivationPage.xaml.cs | 2 +-
.../Snap.Hutao/View/Page/DailyNotePage.xaml | 86 ++---
.../View/Page/DailyNotePage.xaml.cs | 2 +-
.../Snap.Hutao/View/Page/FeedbackPage.xaml | 104 +++---
.../Snap.Hutao/View/Page/FeedbackPage.xaml.cs | 2 +-
.../Snap.Hutao/View/Page/GachaLogPage.xaml | 151 ++++-----
.../Snap.Hutao/View/Page/GachaLogPage.xaml.cs | 2 +-
.../Snap.Hutao/View/Page/LaunchGamePage.xaml | 159 +++++----
.../View/Page/LaunchGamePage.xaml.cs | 2 +-
.../View/Page/LoginHoyoverseUserPage.xaml | 8 +-
.../View/Page/LoginMihoyoUserPage.xaml | 8 +-
.../Snap.Hutao/View/Page/SettingPage.xaml | 303 +++++++++---------
.../Snap.Hutao/View/Page/SettingPage.xaml.cs | 2 +-
.../View/Page/SpiralAbyssRecordPage.xaml | 130 ++++----
.../View/Page/SpiralAbyssRecordPage.xaml.cs | 2 +-
.../Snap.Hutao/View/Page/TestPage.xaml | 10 +-
.../Snap.Hutao/View/Page/TestPage.xaml.cs | 2 +-
.../Snap.Hutao/View/Page/WikiAvatarPage.xaml | 121 ++++---
.../View/Page/WikiAvatarPage.xaml.cs | 2 +-
.../Snap.Hutao/View/Page/WikiMonsterPage.xaml | 21 +-
.../View/Page/WikiMonsterPage.xaml.cs | 2 +-
.../Snap.Hutao/View/Page/WikiWeaponPage.xaml | 65 ++--
.../View/Page/WikiWeaponPage.xaml.cs | 2 +-
src/Snap.Hutao/Snap.Hutao/View/TitleView.xaml | 4 +-
src/Snap.Hutao/Snap.Hutao/View/UserView.xaml | 60 ++--
.../AvatarProperty/AvatarPropertyViewModel.cs | 3 +-
.../IBackgroundImagePresenterAccessor.cs | 2 +-
.../Snap.Hutao/ViewModel/MainViewModel.cs | 2 +-
.../Snap.Hutao/ViewModel/Wiki/AvatarFilter.cs | 2 +-
.../Snap.Hutao/ViewModel/Wiki/WeaponFilter.cs | 2 +-
.../ViewModel/Wiki/WikiAvatarViewModel.cs | 2 +-
.../ViewModel/Wiki/WikiWeaponViewModel.cs | 2 +-
210 files changed, 1535 insertions(+), 1742 deletions(-)
delete mode 100644 src/Snap.Hutao/Snap.Hutao/Control/Media/Bgra32.cs
delete mode 100644 src/Snap.Hutao/Snap.Hutao/Control/Media/Hsla32.cs
delete mode 100644 src/Snap.Hutao/Snap.Hutao/Control/Media/Rgba32.cs
rename src/Snap.Hutao/Snap.Hutao/{Control/Media => Core/Graphics/Imaging}/SoftwareBitmapExtension.cs (97%)
create mode 100644 src/Snap.Hutao/Snap.Hutao/UI/Bgra32.cs
create mode 100644 src/Snap.Hutao/Snap.Hutao/UI/ColorHelper.cs
rename src/Snap.Hutao/Snap.Hutao/{Control/Image => UI/Composition}/CompositionExtension.cs (98%)
create mode 100644 src/Snap.Hutao/Snap.Hutao/UI/Hsla32.cs
create mode 100644 src/Snap.Hutao/Snap.Hutao/UI/Rgba32.cs
rename src/Snap.Hutao/Snap.Hutao/{Control/Media => UI}/Rgba64.cs (90%)
rename src/Snap.Hutao/Snap.Hutao/{Control => UI/Xaml}/BindingProxy.cs (93%)
rename src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/{Tokenizing => AutoSuggestBox}/AutoSuggestTokenBox.cs (98%)
rename src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/{Tokenizing => AutoSuggestBox}/SearchToken.cs (94%)
rename src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/{Tokenizing => AutoSuggestBox}/SearchTokenKind.cs (83%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/IScopedPageScopeReferenceTracker.cs (83%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Image/CachedImage.cs (98%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Image/CachedImage.xaml (94%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Image/CompositionImage.cs (97%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Image/Gradient.cs (96%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Image/GradientDirection.cs (94%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Image/GradientStop.cs (93%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Image/MonoChrome.cs (95%)
rename src/Snap.Hutao/Snap.Hutao/{Control/Selector => UI/Xaml/Control}/InfoBarTemplateSelector.cs (94%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Layout/UniformStaggeredColumnLayout.cs (91%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Layout/UniformStaggeredItem.cs (90%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Layout/UniformStaggeredLayout.cs (99%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Layout/UniformStaggeredLayoutState.cs (94%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Layout/WrapItem.cs (92%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Layout/WrapLayout.cs (98%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Layout/WrapLayoutState.cs (96%)
rename src/Snap.Hutao/Snap.Hutao/{Control/Panel/PanelSelector.xaml => UI/Xaml/Control/LayoutSwitch.xaml} (52%)
rename src/Snap.Hutao/Snap.Hutao/{Control/Panel/PanelSelector.xaml.cs => UI/Xaml/Control/LayoutSwitch.xaml.cs} (75%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Loading.cs (74%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Loading.xaml (95%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Panel/EqualPanel.cs (98%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Panel/HorizontalEqualPanel.cs (98%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Panel/UniformPanel.cs (97%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/ScopedPage.cs (98%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/ScopedPageScopeReferenceTracker.cs (96%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/SizeRestrictedContentControl.cs (97%)
rename src/Snap.Hutao/Snap.Hutao/{Control/Text => UI/Xaml/Control/TextBlock}/DescriptionTextBlock.cs (75%)
rename src/Snap.Hutao/Snap.Hutao/{Control/Text => UI/Xaml/Control/TextBlock}/HtmlDescriptionTextBlock.cs (82%)
rename src/Snap.Hutao/Snap.Hutao/{Control/Text => UI/Xaml/Control/TextBlock}/Syntax/MiHoYo/MiHoYoColorKind.cs (71%)
rename src/Snap.Hutao/Snap.Hutao/{Control/Text => UI/Xaml/Control/TextBlock}/Syntax/MiHoYo/MiHoYoColorTextSyntax.cs (96%)
rename src/Snap.Hutao/Snap.Hutao/{Control/Text => UI/Xaml/Control/TextBlock}/Syntax/MiHoYo/MiHoYoItalicTextSyntax.cs (89%)
rename src/Snap.Hutao/Snap.Hutao/{Control/Text => UI/Xaml/Control/TextBlock}/Syntax/MiHoYo/MiHoYoPlainTextSyntax.cs (87%)
rename src/Snap.Hutao/Snap.Hutao/{Control/Text => UI/Xaml/Control/TextBlock}/Syntax/MiHoYo/MiHoYoRootSyntax.cs (81%)
rename src/Snap.Hutao/Snap.Hutao/{Control/Text => UI/Xaml/Control/TextBlock}/Syntax/MiHoYo/MiHoYoSyntaxKind.cs (75%)
rename src/Snap.Hutao/Snap.Hutao/{Control/Text => UI/Xaml/Control/TextBlock}/Syntax/MiHoYo/MiHoYoSyntaxNode.cs (88%)
rename src/Snap.Hutao/Snap.Hutao/{Control/Text => UI/Xaml/Control/TextBlock}/Syntax/MiHoYo/MiHoYoSyntaxTree.cs (98%)
rename src/Snap.Hutao/Snap.Hutao/{Control/Text => UI/Xaml/Control/TextBlock}/Syntax/MiHoYo/MiHoYoXmlElementSyntax.cs (90%)
rename src/Snap.Hutao/Snap.Hutao/{Control/Text => UI/Xaml/Control/TextBlock}/Syntax/SyntaxNode.cs (93%)
rename src/Snap.Hutao/Snap.Hutao/{Control/Text => UI/Xaml/Control/TextBlock}/Syntax/TextPosition.cs (92%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/Card.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/Color.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/ComboBox.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/Converter.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/CornerRadius.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/FlyoutStyle.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/FontStyle.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/Glyph.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/InfoBarOverride.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/ItemsPanelTemplate.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/KnownColors.cs (92%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/NumericValue.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/PageOverride.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/PivotOverride.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/ScrollViewer.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/SegmentedOverride.xaml (98%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/SettingsStyle.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/SystemColors.cs (93%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/ThemeHelper.cs (97%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/Thickness.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/TransitionCollection.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/Uri.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{ => UI/Xaml}/Control/Theme/WindowOverride.xaml (100%)
rename src/Snap.Hutao/Snap.Hutao/{Control => UI/Xaml/Data}/DependencyValueConverter.cs (55%)
rename src/Snap.Hutao/Snap.Hutao/{Control => UI/Xaml/Data}/ValueConverter.cs (54%)
rename src/Snap.Hutao/Snap.Hutao/{Control => UI/Xaml}/IXamlElementAccessor.cs (81%)
rename src/Snap.Hutao/Snap.Hutao/{Control => UI/Xaml}/Markup/BitmapIconExtension.cs (96%)
rename src/Snap.Hutao/Snap.Hutao/{Control => UI/Xaml}/Markup/FontIconExtension.cs (95%)
rename src/Snap.Hutao/Snap.Hutao/{Control => UI/Xaml}/Markup/Int32Extension.cs (91%)
rename src/Snap.Hutao/Snap.Hutao/{Control => UI/Xaml}/Markup/ResourceStringExtension.cs (56%)
rename src/Snap.Hutao/Snap.Hutao/{Control => UI/Xaml}/Markup/UInt32Extension.cs (91%)
rename src/Snap.Hutao/Snap.Hutao/{Control => UI/Xaml}/Markup/XamlServiceProviderExtension.cs (97%)
diff --git a/src/Snap.Hutao/Snap.Hutao/App.xaml b/src/Snap.Hutao/Snap.Hutao/App.xaml
index a33c83e7..125db5cf 100644
--- a/src/Snap.Hutao/Snap.Hutao/App.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/App.xaml
@@ -8,28 +8,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Snap.Hutao/Snap.Hutao/Control/Media/Bgra32.cs b/src/Snap.Hutao/Snap.Hutao/Control/Media/Bgra32.cs
deleted file mode 100644
index 7fb629c8..00000000
--- a/src/Snap.Hutao/Snap.Hutao/Control/Media/Bgra32.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) DGP Studio. All rights reserved.
-// Licensed under the MIT license.
-
-using System.Buffers.Binary;
-using System.Runtime.CompilerServices;
-using Windows.UI;
-
-namespace Snap.Hutao.Control.Media;
-
-///
-/// BGRA 结构
-///
-[HighQuality]
-internal struct Bgra32
-{
- ///
- /// B
- ///
- public byte B;
-
- ///
- /// G
- ///
- public byte G;
-
- ///
- /// R
- ///
- public byte R;
-
- ///
- /// A
- ///
- public byte A;
-
- public Bgra32(byte b, byte g, byte r, byte a)
- {
- B = b;
- G = g;
- R = r;
- A = a;
- }
-
- public readonly double Luminance { get => ((0.299 * R) + (0.587 * G) + (0.114 * B)) / 255; }
-
- ///
- /// 从 Color 转换
- ///
- /// 颜色
- /// 新的 BGRA8 结构
- public static unsafe implicit operator Bgra32(Color color)
- {
- Unsafe.SkipInit(out Bgra32 bgra8);
- *(uint*)&bgra8 = BinaryPrimitives.ReverseEndianness(*(uint*)&color);
- return bgra8;
- }
-
- public static unsafe implicit operator Color(Bgra32 bgra8)
- {
- Unsafe.SkipInit(out Color color);
- *(uint*)&color = BinaryPrimitives.ReverseEndianness(*(uint*)&bgra8);
- return color;
- }
-}
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/Control/Media/Hsla32.cs b/src/Snap.Hutao/Snap.Hutao/Control/Media/Hsla32.cs
deleted file mode 100644
index 76743b55..00000000
--- a/src/Snap.Hutao/Snap.Hutao/Control/Media/Hsla32.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) DGP Studio. All rights reserved.
-// Licensed under the MIT license.
-// Some part of this file came from:
-// https://github.com/xunkong/desktop/tree/main/src/Desktop/Desktop/Pages/CharacterInfoPage.xaml.cs
-
-namespace Snap.Hutao.Control.Media;
-
-///
-/// Defines a color in Hue/Saturation/Lightness (HSL) space.
-///
-internal struct Hsla32
-{
- ///
- /// The Hue in 0..360 range.
- ///
- public double H;
-
- ///
- /// The Saturation in 0..1 range.
- ///
- public double S;
-
- ///
- /// The Lightness in 0..1 range.
- ///
- public double L;
-
- ///
- /// The Alpha/opacity in 0..1 range.
- ///
- public double A;
-}
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/Control/Media/Rgba32.cs b/src/Snap.Hutao/Snap.Hutao/Control/Media/Rgba32.cs
deleted file mode 100644
index 33aacc36..00000000
--- a/src/Snap.Hutao/Snap.Hutao/Control/Media/Rgba32.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-// Copyright (c) DGP Studio. All rights reserved.
-// Licensed under the MIT license.
-// Some part of this file came from:
-// https://github.com/xunkong/desktop/tree/main/src/Desktop/Desktop/Pages/CharacterInfoPage.xaml.cs
-
-using System.Buffers.Binary;
-using Windows.UI;
-
-namespace Snap.Hutao.Control.Media;
-
-[HighQuality]
-internal struct Rgba32
-{
- public byte R;
- public byte G;
- public byte B;
- public byte A;
-
- public Rgba32(string hex)
- : this(hex.Length == 6 ? Convert.ToUInt32($"{hex}FF", 16) : Convert.ToUInt32(hex, 16))
- {
- }
-
- public unsafe Rgba32(uint xrgbaCode)
- {
- // uint layout: 0xRRGGBBAA is AABBGGRR
- // AABBGGRR -> RRGGBBAA
- fixed (Rgba32* pSelf = &this)
- {
- *(uint*)pSelf = BinaryPrimitives.ReverseEndianness(xrgbaCode);
- }
- }
-
- private Rgba32(byte r, byte g, byte b, byte a)
- {
- R = r;
- G = g;
- B = b;
- A = a;
- }
-
- public static unsafe implicit operator Color(Rgba32 hexColor)
- {
- // Goal : Rgba32:RRGGBBAA(0xAABBGGRR) -> Color: AARRGGBB(0xBBGGRRAA)
- // Step1: Rgba32:RRGGBBAA(0xAABBGGRR) -> UInt32:AA000000(0x000000AA)
- uint a = ((*(uint*)&hexColor) >> 24) & 0x000000FF;
-
- // Step2: Rgba32:RRGGBBAA(0xAABBGGRR) -> UInt32:00RRGGBB(0xRRGGBB00)
- uint rgb = ((*(uint*)&hexColor) << 8) & 0xFFFFFF00;
-
- // Step2: UInt32:00RRGGBB(0xRRGGBB00) + UInt32:AA000000(0x000000AA) -> UInt32:AARRGGBB(0xRRGGBBAA)
- uint rgba = rgb + a;
-
- return *(Color*)&rgba;
- }
-
- public static Rgba32 FromHsl(Hsla32 hsl)
- {
- double chroma = (1 - Math.Abs((2 * hsl.L) - 1)) * hsl.S;
- double h1 = hsl.H / 60;
- double x = chroma * (1 - Math.Abs((h1 % 2) - 1));
- double m = hsl.L - (0.5 * chroma);
- double r1, g1, b1;
-
- if (h1 < 1)
- {
- r1 = chroma;
- g1 = x;
- b1 = 0;
- }
- else if (h1 < 2)
- {
- r1 = x;
- g1 = chroma;
- b1 = 0;
- }
- else if (h1 < 3)
- {
- r1 = 0;
- g1 = chroma;
- b1 = x;
- }
- else if (h1 < 4)
- {
- r1 = 0;
- g1 = x;
- b1 = chroma;
- }
- else if (h1 < 5)
- {
- r1 = x;
- g1 = 0;
- b1 = chroma;
- }
- else
- {
- r1 = chroma;
- g1 = 0;
- b1 = x;
- }
-
- byte r = (byte)(255 * (r1 + m));
- byte g = (byte)(255 * (g1 + m));
- byte b = (byte)(255 * (b1 + m));
- byte a = (byte)(255 * hsl.A);
-
- return new(r, g, b, a);
- }
-
- public readonly Hsla32 ToHsl()
- {
- const double toDouble = 1.0 / 255;
- double r = toDouble * R;
- double g = toDouble * G;
- double b = toDouble * B;
- double max = Math.Max(Math.Max(r, g), b);
- double min = Math.Min(Math.Min(r, g), b);
- double chroma = max - min;
- double h1;
-
- if (chroma == 0)
- {
- h1 = 0;
- }
- else if (max == r)
- {
- // The % operator doesn't do proper modulo on negative
- // numbers, so we'll add 6 before using it
- h1 = (((g - b) / chroma) + 6) % 6;
- }
- else if (max == g)
- {
- h1 = 2 + ((b - r) / chroma);
- }
- else
- {
- h1 = 4 + ((r - g) / chroma);
- }
-
- double lightness = 0.5 * (max + min);
- double saturation = chroma == 0 ? 0 : chroma / (1 - Math.Abs((2 * lightness) - 1));
-
- Hsla32 ret;
- ret.H = 60 * h1;
- ret.S = saturation;
- ret.L = lightness;
- ret.A = toDouble * A;
- return ret;
- }
-}
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/Control/Media/SoftwareBitmapExtension.cs b/src/Snap.Hutao/Snap.Hutao/Core/Graphics/Imaging/SoftwareBitmapExtension.cs
similarity index 97%
rename from src/Snap.Hutao/Snap.Hutao/Control/Media/SoftwareBitmapExtension.cs
rename to src/Snap.Hutao/Snap.Hutao/Core/Graphics/Imaging/SoftwareBitmapExtension.cs
index 1a948406..1d6c8db0 100644
--- a/src/Snap.Hutao/Snap.Hutao/Control/Media/SoftwareBitmapExtension.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Core/Graphics/Imaging/SoftwareBitmapExtension.cs
@@ -1,12 +1,13 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
+using Snap.Hutao.UI;
using Snap.Hutao.Win32.System.WinRT;
using Windows.Foundation;
using Windows.Graphics.Imaging;
using WinRT;
-namespace Snap.Hutao.Control.Media;
+namespace Snap.Hutao.Core.Graphics.Imaging;
///
/// 软件位图拓展
diff --git a/src/Snap.Hutao/Snap.Hutao/Core/Windowing/NotifyIcon/NotifyIconContextMenu.xaml b/src/Snap.Hutao/Snap.Hutao/Core/Windowing/NotifyIcon/NotifyIconContextMenu.xaml
index 1cd48309..dbf57c24 100644
--- a/src/Snap.Hutao/Snap.Hutao/Core/Windowing/NotifyIcon/NotifyIconContextMenu.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/Core/Windowing/NotifyIcon/NotifyIconContextMenu.xaml
@@ -5,8 +5,7 @@
xmlns:cw="using:CommunityToolkit.WinUI"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:shch="using:Snap.Hutao.Control.Helper"
- xmlns:shcm="using:Snap.Hutao.Control.Markup"
+ xmlns:shuxm="using:Snap.Hutao.UI.Xaml.Markup"
xmlns:shcwb="using:Snap.Hutao.Core.Windowing.Backdrop"
xmlns:shv="using:Snap.Hutao.ViewModel"
ShouldConstrainToRootBounds="False"
@@ -42,7 +41,7 @@
HorizontalAlignment="Right"
Orientation="Horizontal"
Spacing="2">
-
+
-
+
-
+
@@ -21,7 +21,7 @@
Margin="12,0,0,0"
VerticalAlignment="Center"
Style="{StaticResource CaptionTextBlockStyle}"
- Text="{shcm:ResourceString Name=GuideWindowTitle}"
+ Text="{shuxm:ResourceString Name=GuideWindowTitle}"
TextWrapping="NoWrap"/>
diff --git a/src/Snap.Hutao/Snap.Hutao/IdentifyMonitorWindow.xaml b/src/Snap.Hutao/Snap.Hutao/IdentifyMonitorWindow.xaml
index 38bce5af..22c7d529 100644
--- a/src/Snap.Hutao/Snap.Hutao/IdentifyMonitorWindow.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/IdentifyMonitorWindow.xaml
@@ -4,13 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:shcm="using:Snap.Hutao.Control.Markup"
+ xmlns:shuxm="using:Snap.Hutao.UI.Xaml.Markup"
mc:Ignorable="d">
-
+
@@ -28,7 +28,7 @@
Margin="12,0,0,0"
VerticalAlignment="Center"
Style="{StaticResource CaptionTextBlockStyle}"
- Text="{shcm:ResourceString Name=LaunchGameTitle}"
+ Text="{shuxm:ResourceString Name=LaunchGameTitle}"
TextWrapping="NoWrap"/>
@@ -44,7 +44,7 @@
+ Text="{Binding AttachUid, TargetNullValue={shuxm:ResourceString Name=ViewPageLaunchGameSwitchAccountAttachUidNull}}"/>
@@ -56,6 +56,6 @@
Margin="16"
HorizontalAlignment="Stretch"
Command="{Binding LaunchCommand}"
- Content="{shcm:ResourceString Name=ViewPageLaunchGameAction}"/>
+ Content="{shuxm:ResourceString Name=ViewPageLaunchGameAction}"/>
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AchievementIconConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AchievementIconConverter.cs
index 5b4473d8..f99084cb 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AchievementIconConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AchievementIconConverter.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AssociationTypeIconConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AssociationTypeIconConverter.cs
index 64a85a16..af0cd3ca 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AssociationTypeIconConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AssociationTypeIconConverter.cs
@@ -1,9 +1,9 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
using Snap.Hutao.Core.ExceptionService;
using Snap.Hutao.Model.Intrinsic;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarCardConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarCardConverter.cs
index b81245c4..138d5319 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarCardConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarCardConverter.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarIconCircleConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarIconCircleConverter.cs
index 97a04a65..4c6bbb2d 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarIconCircleConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarIconCircleConverter.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarIconConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarIconConverter.cs
index 61777dc8..38096d43 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarIconConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarIconConverter.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarNameCardPicConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarNameCardPicConverter.cs
index 99a5da2f..3fa499f7 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarNameCardPicConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarNameCardPicConverter.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarSideIconConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarSideIconConverter.cs
index 6aed1e88..b1b12239 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarSideIconConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/AvatarSideIconConverter.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/DescriptionsParametersDescriptor.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/DescriptionsParametersDescriptor.cs
index f1f76177..9103cf40 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/DescriptionsParametersDescriptor.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/DescriptionsParametersDescriptor.cs
@@ -1,11 +1,11 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
using Snap.Hutao.Core.ExceptionService;
using Snap.Hutao.Metadata;
using Snap.Hutao.Model.Metadata.Avatar;
using Snap.Hutao.Model.Primitive;
+using Snap.Hutao.UI.Xaml.Data;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/ElementNameIconConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/ElementNameIconConverter.cs
index a2579baa..b3bc5141 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/ElementNameIconConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/ElementNameIconConverter.cs
@@ -1,8 +1,8 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
using Snap.Hutao.Model.Intrinsic;
+using Snap.Hutao.UI.Xaml.Data;
using System.Collections.Frozen;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/EmotionIconConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/EmotionIconConverter.cs
index ca2e17a7..19922a5f 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/EmotionIconConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/EmotionIconConverter.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/EquipIconConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/EquipIconConverter.cs
index ba2d859b..a75144b8 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/EquipIconConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/EquipIconConverter.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/GachaAvatarIconConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/GachaAvatarIconConverter.cs
index 7188f9bd..c006a1f4 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/GachaAvatarIconConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/GachaAvatarIconConverter.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/GachaAvatarImgConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/GachaAvatarImgConverter.cs
index b7cd115c..8233adff 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/GachaAvatarImgConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/GachaAvatarImgConverter.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/GachaEquipIconConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/GachaEquipIconConverter.cs
index f0f504a9..36e9640e 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/GachaEquipIconConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/GachaEquipIconConverter.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/ItemIconConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/ItemIconConverter.cs
index 761ab234..ee638df7 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/ItemIconConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/ItemIconConverter.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/MonsterIconConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/MonsterIconConverter.cs
index 14d9570a..22c1ce9d 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/MonsterIconConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/MonsterIconConverter.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/PropertiesParametersDescriptor.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/PropertiesParametersDescriptor.cs
index dba16ac2..370c8f19 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/PropertiesParametersDescriptor.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/PropertiesParametersDescriptor.cs
@@ -1,8 +1,8 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
using Snap.Hutao.Model.Intrinsic;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/QualityColorConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/QualityColorConverter.cs
index a2dda53c..6c55c2c4 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/QualityColorConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/QualityColorConverter.cs
@@ -2,9 +2,9 @@
// Licensed under the MIT license.
using Microsoft.UI;
-using Snap.Hutao.Control;
-using Snap.Hutao.Control.Theme;
using Snap.Hutao.Model.Intrinsic;
+using Snap.Hutao.UI.Xaml.Control.Theme;
+using Snap.Hutao.UI.Xaml.Data;
using System.Collections.Frozen;
using Windows.UI;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/QualityConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/QualityConverter.cs
index 746141b9..1c932bab 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/QualityConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/QualityConverter.cs
@@ -1,8 +1,8 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
using Snap.Hutao.Model.Intrinsic;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/RelicIconConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/RelicIconConverter.cs
index a75a7efa..c4442f97 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/RelicIconConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/RelicIconConverter.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/SkillIconConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/SkillIconConverter.cs
index b19d770a..d074dde7 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/SkillIconConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/SkillIconConverter.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Data;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/WeaponTypeIconConverter.cs b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/WeaponTypeIconConverter.cs
index dc9350ad..f75b6354 100644
--- a/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/WeaponTypeIconConverter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Model/Metadata/Converter/WeaponTypeIconConverter.cs
@@ -1,9 +1,9 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
using Snap.Hutao.Core.ExceptionService;
using Snap.Hutao.Model.Intrinsic;
+using Snap.Hutao.UI.Xaml.Data;
using System.Collections.Frozen;
namespace Snap.Hutao.Model.Metadata.Converter;
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/BackgroundImage/BackgroundImageService.cs b/src/Snap.Hutao/Snap.Hutao/Service/BackgroundImage/BackgroundImageService.cs
index c7fa3190..02def2e5 100644
--- a/src/Snap.Hutao/Snap.Hutao/Service/BackgroundImage/BackgroundImageService.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Service/BackgroundImage/BackgroundImageService.cs
@@ -1,10 +1,11 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control.Media;
using Snap.Hutao.Core;
using Snap.Hutao.Core.Caching;
+using Snap.Hutao.Core.Graphics.Imaging;
using Snap.Hutao.Core.IO;
+using Snap.Hutao.UI;
using Snap.Hutao.Web.Hutao.Wallpaper;
using Snap.Hutao.Web.Response;
using Snap.Hutao.Win32.Foundation;
@@ -72,7 +73,7 @@ internal sealed partial class BackgroundImageService : IBackgroundImageService
Path = path,
ImageSource = new(path.ToUri()),
AccentColor = accentColor,
- Luminance = accentColor.Luminance,
+ Luminance = accentColor.Brightness,
};
return new(true, background);
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/Game/Automation/ScreenCapture/GameScreenCaptureSession.cs b/src/Snap.Hutao/Snap.Hutao/Service/Game/Automation/ScreenCapture/GameScreenCaptureSession.cs
index 0369aeae..b845d083 100644
--- a/src/Snap.Hutao/Snap.Hutao/Service/Game/Automation/ScreenCapture/GameScreenCaptureSession.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Service/Game/Automation/ScreenCapture/GameScreenCaptureSession.cs
@@ -1,9 +1,9 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control.Media;
using Snap.Hutao.Core;
using Snap.Hutao.Core.ExceptionService;
+using Snap.Hutao.UI;
using Snap.Hutao.Win32.Graphics.Direct3D11;
using Snap.Hutao.Win32.Graphics.Dxgi;
using Snap.Hutao.Win32.Graphics.Dxgi.Common;
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/Navigation/INavigationViewAccessor.cs b/src/Snap.Hutao/Snap.Hutao/Service/Navigation/INavigationViewAccessor.cs
index c219bd2c..439898dd 100644
--- a/src/Snap.Hutao/Snap.Hutao/Service/Navigation/INavigationViewAccessor.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Service/Navigation/INavigationViewAccessor.cs
@@ -2,7 +2,7 @@
// Licensed under the MIT license.
using Microsoft.UI.Xaml.Controls;
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml;
namespace Snap.Hutao.Service.Navigation;
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/Navigation/NavigationService.cs b/src/Snap.Hutao/Snap.Hutao/Service/Navigation/NavigationService.cs
index aaffec01..eb9ce7ee 100644
--- a/src/Snap.Hutao/Snap.Hutao/Service/Navigation/NavigationService.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Service/Navigation/NavigationService.cs
@@ -2,10 +2,10 @@
// Licensed under the MIT license.
using Microsoft.UI.Xaml.Controls;
-using Snap.Hutao.Control;
using Snap.Hutao.Core.Logging;
using Snap.Hutao.Core.Setting;
using Snap.Hutao.Service.Notification;
+using Snap.Hutao.UI.Xaml.Control;
using Snap.Hutao.View.Helper;
using Snap.Hutao.View.Page;
using Windows.Foundation;
diff --git a/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj b/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj
index 27b5606e..88d4fc32 100644
--- a/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj
+++ b/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj
@@ -89,26 +89,26 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -393,16 +393,6 @@
MSBuild:Compile
-
-
- MSBuild:Compile
-
-
-
-
- MSBuild:Compile
-
-
MSBuild:Compile
@@ -423,23 +413,6 @@
MSBuild:Compile
-
-
- MSBuild:Compile
-
-
-
-
-
- MSBuild:Compile
-
-
-
-
-
- MSBuild:Compile
-
-
@@ -471,96 +444,12 @@
-
-
- MSBuild:Compile
-
-
-
-
-
- MSBuild:Compile
-
-
-
-
-
- MSBuild:Compile
-
-
-
-
-
- MSBuild:Compile
-
-
-
MSBuild:Compile
-
-
- MSBuild:Compile
-
-
-
-
-
- MSBuild:Compile
-
-
-
-
-
- MSBuild:Compile
-
-
-
-
-
- MSBuild:Compile
-
-
-
-
-
- MSBuild:Compile
-
-
-
-
-
- MSBuild:Compile
-
-
-
-
-
- MSBuild:Compile
-
-
-
-
-
- MSBuild:Compile
-
-
-
-
-
- MSBuild:Compile
-
-
-
-
-
- MSBuild:Compile
-
-
-
MSBuild:Compile
@@ -844,7 +733,7 @@
-
+
MSBuild:Compile
@@ -878,4 +767,7 @@
MSBuild:Compile
+
+
+
diff --git a/src/Snap.Hutao/Snap.Hutao/UI/Bgra32.cs b/src/Snap.Hutao/Snap.Hutao/UI/Bgra32.cs
new file mode 100644
index 00000000..aec3e0c7
--- /dev/null
+++ b/src/Snap.Hutao/Snap.Hutao/UI/Bgra32.cs
@@ -0,0 +1,37 @@
+// Copyright (c) DGP Studio. All rights reserved.
+// Licensed under the MIT license.
+
+using System.Buffers.Binary;
+using System.Runtime.CompilerServices;
+using Windows.UI;
+
+namespace Snap.Hutao.UI;
+
+[HighQuality]
+internal struct Bgra32
+{
+ public byte B;
+ public byte G;
+ public byte R;
+ public byte A;
+
+ public Bgra32(byte b, byte g, byte r, byte a)
+ {
+ B = b;
+ G = g;
+ R = r;
+ A = a;
+ }
+
+ public readonly double Brightness { get => ((0.299 * R) + (0.587 * G) + (0.114 * B)) / 255; }
+
+ public static unsafe implicit operator Bgra32(Color color)
+ {
+ return ColorHelper.ToBgra32(color);
+ }
+
+ public static unsafe implicit operator Color(Bgra32 bgra8)
+ {
+ return ColorHelper.ToColor(bgra8);
+ }
+}
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/UI/ColorHelper.cs b/src/Snap.Hutao/Snap.Hutao/UI/ColorHelper.cs
new file mode 100644
index 00000000..aec73aed
--- /dev/null
+++ b/src/Snap.Hutao/Snap.Hutao/UI/ColorHelper.cs
@@ -0,0 +1,105 @@
+// Copyright (c) DGP Studio. All rights reserved.
+// Licensed under the MIT license.
+
+using System.Buffers.Binary;
+using System.Runtime.CompilerServices;
+using Windows.UI;
+
+namespace Snap.Hutao.UI;
+
+internal static class ColorHelper
+{
+ public static unsafe Bgra32 ToBgra32(Color color)
+ {
+ uint value = BinaryPrimitives.ReverseEndianness(*(uint*)&color);
+ return *(Bgra32*)&value;
+ }
+
+ public static unsafe Color ToColor(Bgra32 bgra32)
+ {
+ uint value = BinaryPrimitives.ReverseEndianness(*(uint*)&bgra32);
+ return *(Color*)&value;
+ }
+
+ public static unsafe Color ToColor(Rgba32 rgba32)
+ {
+ // Goal : Rgba32:RRGGBBAA(0xAABBGGRR) -> Color: AARRGGBB(0xBBGGRRAA)
+ // Step1: Rgba32:RRGGBBAA(0xAABBGGRR) -> UInt32:AA000000(0x000000AA)
+ uint a = *(uint*)&rgba32 >>> 24;
+
+ // Step2: Rgba32:RRGGBBAA(0xAABBGGRR) -> UInt32:00RRGGBB(0xRRGGBB00)
+ uint rgb = *(uint*)&rgba32 << 8;
+
+ // Step2: UInt32:00RRGGBB(0xRRGGBB00) + UInt32:AA000000(0x000000AA) -> UInt32:AARRGGBB(0xRRGGBBAA)
+ uint rgba = rgb + a;
+
+ return *(Color*)&rgba;
+ }
+
+ public static Hsla32 ToHsla32(Rgba32 rgba32)
+ {
+ const double toDouble = 1.0 / 255;
+
+ double r = toDouble * rgba32.R;
+ double g = toDouble * rgba32.G;
+ double b = toDouble * rgba32.B;
+ double max = Math.Max(Math.Max(r, g), b);
+ double min = Math.Min(Math.Min(r, g), b);
+ double chroma = max - min;
+ double h1;
+
+ if (chroma == 0)
+ {
+ h1 = 0;
+ }
+ else if (max == r)
+ {
+ // The % operator doesn't do proper modulo on negative
+ // numbers, so we'll add 6 before using it
+ h1 = (((g - b) / chroma) + 6) % 6;
+ }
+ else if (max == g)
+ {
+ h1 = 2 + ((b - r) / chroma);
+ }
+ else
+ {
+ h1 = 4 + ((r - g) / chroma);
+ }
+
+ double lightness = 0.5 * (max + min);
+ double saturation = chroma == 0 ? 0 : chroma / (1 - Math.Abs((2 * lightness) - 1));
+
+ Hsla32 ret;
+ ret.H = 60 * h1;
+ ret.S = saturation;
+ ret.L = lightness;
+ ret.A = toDouble * rgba32.A;
+ return ret;
+ }
+
+ public static Rgba32 ToRgba32(Hsla32 hsla32)
+ {
+ double chroma = (1 - Math.Abs((2 * hsla32.L) - 1)) * hsla32.S;
+ double h1 = hsla32.H / 60;
+ double x = chroma * (1 - Math.Abs((h1 % 2) - 1));
+ double m = hsla32.L - (0.5 * chroma);
+ double r1, g1, b1;
+ (r1, g1, b1) = ((double, double, double))(h1 switch
+ {
+ < 1 => (chroma, x, 0),
+ < 2 => (x, chroma, 0),
+ < 3 => (0, chroma, x),
+ < 4 => (0, x, chroma),
+ < 5 => (x, 0, chroma),
+ _ => (chroma, 0, x),
+ });
+
+ byte r = (byte)(255 * (r1 + m));
+ byte g = (byte)(255 * (g1 + m));
+ byte b = (byte)(255 * (b1 + m));
+ byte a = (byte)(255 * hsla32.A);
+
+ return new Rgba32(r, g, b, a);
+ }
+}
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/Control/Image/CompositionExtension.cs b/src/Snap.Hutao/Snap.Hutao/UI/Composition/CompositionExtension.cs
similarity index 98%
rename from src/Snap.Hutao/Snap.Hutao/Control/Image/CompositionExtension.cs
rename to src/Snap.Hutao/Snap.Hutao/UI/Composition/CompositionExtension.cs
index aa7ff0b1..b5a4fda9 100644
--- a/src/Snap.Hutao/Snap.Hutao/Control/Image/CompositionExtension.cs
+++ b/src/Snap.Hutao/Snap.Hutao/UI/Composition/CompositionExtension.cs
@@ -3,9 +3,10 @@
using Microsoft.Graphics.Canvas.Effects;
using Microsoft.UI.Composition;
+using Snap.Hutao.UI.Xaml.Control.Image;
using System.Numerics;
-namespace Snap.Hutao.Control.Image;
+namespace Snap.Hutao.UI.Composition;
///
/// 合成扩展
diff --git a/src/Snap.Hutao/Snap.Hutao/UI/Hsla32.cs b/src/Snap.Hutao/Snap.Hutao/UI/Hsla32.cs
new file mode 100644
index 00000000..6fc773aa
--- /dev/null
+++ b/src/Snap.Hutao/Snap.Hutao/UI/Hsla32.cs
@@ -0,0 +1,12 @@
+// Copyright (c) DGP Studio. All rights reserved.
+// Licensed under the MIT license.
+
+namespace Snap.Hutao.UI;
+
+internal struct Hsla32
+{
+ public double H;
+ public double S;
+ public double L;
+ public double A;
+}
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/UI/Rgba32.cs b/src/Snap.Hutao/Snap.Hutao/UI/Rgba32.cs
new file mode 100644
index 00000000..19323a33
--- /dev/null
+++ b/src/Snap.Hutao/Snap.Hutao/UI/Rgba32.cs
@@ -0,0 +1,44 @@
+// Copyright (c) DGP Studio. All rights reserved.
+// Licensed under the MIT license.
+
+using System.Buffers.Binary;
+using Windows.UI;
+
+namespace Snap.Hutao.UI;
+
+[HighQuality]
+internal struct Rgba32
+{
+ public byte R;
+ public byte G;
+ public byte B;
+ public byte A;
+
+ public Rgba32(string hex)
+ : this(hex.Length == 6 ? Convert.ToUInt32($"{hex}FF", 16) : Convert.ToUInt32(hex, 16))
+ {
+ }
+
+ public unsafe Rgba32(uint xrgbaCode)
+ {
+ // uint layout: 0xRRGGBBAA is AABBGGRR
+ // AABBGGRR -> RRGGBBAA
+ fixed (Rgba32* pSelf = &this)
+ {
+ *(uint*)pSelf = BinaryPrimitives.ReverseEndianness(xrgbaCode);
+ }
+ }
+
+ public Rgba32(byte r, byte g, byte b, byte a)
+ {
+ R = r;
+ G = g;
+ B = b;
+ A = a;
+ }
+
+ public static unsafe implicit operator Color(Rgba32 rgba32)
+ {
+ return ColorHelper.ToColor(rgba32);
+ }
+}
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/Control/Media/Rgba64.cs b/src/Snap.Hutao/Snap.Hutao/UI/Rgba64.cs
similarity index 90%
rename from src/Snap.Hutao/Snap.Hutao/Control/Media/Rgba64.cs
rename to src/Snap.Hutao/Snap.Hutao/UI/Rgba64.cs
index ba1d15b6..74acd983 100644
--- a/src/Snap.Hutao/Snap.Hutao/Control/Media/Rgba64.cs
+++ b/src/Snap.Hutao/Snap.Hutao/UI/Rgba64.cs
@@ -3,7 +3,7 @@
// Some part of this file came from:
// https://github.com/xunkong/desktop/tree/main/src/Desktop/Desktop/Pages/CharacterInfoPage.xaml.cs
-namespace Snap.Hutao.Control.Media;
+namespace Snap.Hutao.UI;
internal struct Rgba64
{
diff --git a/src/Snap.Hutao/Snap.Hutao/Control/BindingProxy.cs b/src/Snap.Hutao/Snap.Hutao/UI/Xaml/BindingProxy.cs
similarity index 93%
rename from src/Snap.Hutao/Snap.Hutao/Control/BindingProxy.cs
rename to src/Snap.Hutao/Snap.Hutao/UI/Xaml/BindingProxy.cs
index 136cdd7b..1df662d2 100644
--- a/src/Snap.Hutao/Snap.Hutao/Control/BindingProxy.cs
+++ b/src/Snap.Hutao/Snap.Hutao/UI/Xaml/BindingProxy.cs
@@ -3,7 +3,7 @@
using Microsoft.UI.Xaml;
-namespace Snap.Hutao.Control;
+namespace Snap.Hutao.UI.Xaml;
///
/// 绑定探针
diff --git a/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/Tokenizing/AutoSuggestTokenBox.cs b/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/AutoSuggestBox/AutoSuggestTokenBox.cs
similarity index 98%
rename from src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/Tokenizing/AutoSuggestTokenBox.cs
rename to src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/AutoSuggestBox/AutoSuggestTokenBox.cs
index 637903c5..2cd04870 100644
--- a/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/Tokenizing/AutoSuggestTokenBox.cs
+++ b/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/AutoSuggestBox/AutoSuggestTokenBox.cs
@@ -9,7 +9,7 @@ using Microsoft.UI.Xaml.Controls.Primitives;
using Snap.Hutao.UI.Input;
using System.Collections;
-namespace Snap.Hutao.UI.Xaml.Control.Tokenizing;
+namespace Snap.Hutao.UI.Xaml.Control.AutoSuggestBox;
[DependencyProperty("FilterCommand", typeof(ICommand))]
[DependencyProperty("FilterCommandParameter", typeof(object))]
diff --git a/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/Tokenizing/SearchToken.cs b/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/AutoSuggestBox/SearchToken.cs
similarity index 94%
rename from src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/Tokenizing/SearchToken.cs
rename to src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/AutoSuggestBox/SearchToken.cs
index 76b30316..e4e7bd48 100644
--- a/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/Tokenizing/SearchToken.cs
+++ b/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/AutoSuggestBox/SearchToken.cs
@@ -3,7 +3,7 @@
using Windows.UI;
-namespace Snap.Hutao.UI.Xaml.Control.Tokenizing;
+namespace Snap.Hutao.UI.Xaml.Control.AutoSuggestBox;
internal sealed class SearchToken
{
diff --git a/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/Tokenizing/SearchTokenKind.cs b/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/AutoSuggestBox/SearchTokenKind.cs
similarity index 83%
rename from src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/Tokenizing/SearchTokenKind.cs
rename to src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/AutoSuggestBox/SearchTokenKind.cs
index f8037e78..250a90b2 100644
--- a/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/Tokenizing/SearchTokenKind.cs
+++ b/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/AutoSuggestBox/SearchTokenKind.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-namespace Snap.Hutao.UI.Xaml.Control.Tokenizing;
+namespace Snap.Hutao.UI.Xaml.Control.AutoSuggestBox;
internal enum SearchTokenKind
{
diff --git a/src/Snap.Hutao/Snap.Hutao/Control/IScopedPageScopeReferenceTracker.cs b/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/IScopedPageScopeReferenceTracker.cs
similarity index 83%
rename from src/Snap.Hutao/Snap.Hutao/Control/IScopedPageScopeReferenceTracker.cs
rename to src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/IScopedPageScopeReferenceTracker.cs
index 49854e9b..8396943a 100644
--- a/src/Snap.Hutao/Snap.Hutao/Control/IScopedPageScopeReferenceTracker.cs
+++ b/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/IScopedPageScopeReferenceTracker.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-namespace Snap.Hutao.Control;
+namespace Snap.Hutao.UI.Xaml.Control;
internal interface IScopedPageScopeReferenceTracker : IDisposable
{
diff --git a/src/Snap.Hutao/Snap.Hutao/Control/Image/CachedImage.cs b/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/Image/CachedImage.cs
similarity index 98%
rename from src/Snap.Hutao/Snap.Hutao/Control/Image/CachedImage.cs
rename to src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/Image/CachedImage.cs
index 99f7972c..41a61f11 100644
--- a/src/Snap.Hutao/Snap.Hutao/Control/Image/CachedImage.cs
+++ b/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/Image/CachedImage.cs
@@ -9,14 +9,13 @@ using Microsoft.UI.Xaml.Media.Imaging;
using Snap.Hutao.Core.Caching;
using Snap.Hutao.Core.ExceptionService;
using Snap.Hutao.Core.IO.DataTransfer;
-using Snap.Hutao.UI.Xaml;
using System.IO;
using System.Runtime.InteropServices;
using Windows.Graphics.Imaging;
using Windows.Media.Casting;
using Windows.Storage.Streams;
-namespace Snap.Hutao.Control.Image;
+namespace Snap.Hutao.UI.Xaml.Control.Image;
[SuppressMessage("", "CA1001")]
[SuppressMessage("", "SH003")]
@@ -49,7 +48,6 @@ internal sealed partial class CachedImage : Microsoft.UI.Xaml.Controls.Control,
public CachedImage()
{
DefaultStyleKey = typeof(CachedImage);
- DefaultStyleResourceUri = "ms-appx:///Control/Image/CachedImage.xaml".ToUri();
}
public bool IsInitialized { get; private set; }
diff --git a/src/Snap.Hutao/Snap.Hutao/Control/Image/CachedImage.xaml b/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/Image/CachedImage.xaml
similarity index 94%
rename from src/Snap.Hutao/Snap.Hutao/Control/Image/CachedImage.xaml
rename to src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/Image/CachedImage.xaml
index 970a9e80..99423d73 100644
--- a/src/Snap.Hutao/Snap.Hutao/Control/Image/CachedImage.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/UI/Xaml/Control/Image/CachedImage.xaml
@@ -1,15 +1,15 @@
-
-
-
+
+
@@ -249,7 +248,7 @@
- 0
0
-
-
+
+
-
-
+
+
@@ -314,7 +313,7 @@
-
@@ -442,7 +441,7 @@
@@ -467,7 +466,7 @@
-
+
+ Text="{shuxm:ResourceString Name=ViewPageAvatarPropertySecondaryProperties}"/>
-
+ Content="{shuxm:ResourceString Name=ViewPageAvatarPropertyRefreshTimeToggle}"/>
-
+ CommandParameter="{Binding ElementName=ItemsPanelSelector, Path=Current, Converter={StaticResource LayoutSwitchModeConverter}}"
+ Icon="{shuxm:FontIcon Glyph=}"
+ Label="{shuxm:ResourceString Name=ViewPageAvatarPropertyExportAsImage}"/>
+
-
+ Text="{shuxm:ResourceString Name=ViewPageAvatarPropertyCalculateCurrent}"/>
+
-
+
-
-
-
+
+
+
@@ -593,7 +592,7 @@
Grid.ColumnSpan="2"
AspectRatio="840:400"
CornerRadius="{ThemeResource ControlCornerRadius}">
-
-
@@ -729,7 +728,7 @@
HorizontalAlignment="Right"
Foreground="#FFFFFFFF"
Style="{StaticResource CaptionTextBlockStyle}"
- Text="{shcm:ResourceString Name=ViewPageAvatarPropertyArtifactScore}"/>
+ Text="{shuxm:ResourceString Name=ViewPageAvatarPropertyArtifactScore}"/>
+ Text="{shuxm:ResourceString Name=ViewPageAvatarPropertyCritScore}"/>
+ Header="{shuxm:ResourceString Name=ViewPageAvatarPropertyHeader}">
-
@@ -803,25 +802,25 @@
Margin="0,16,0,0"
HorizontalAlignment="Center"
Style="{StaticResource SubtitleTextBlockStyle}"
- Text="{shcm:ResourceString Name=ViewPageAvatarPropertyDefaultDescription}"/>
+ Text="{shuxm:ResourceString Name=ViewPageAvatarPropertyDefaultDescription}"/>
@@ -830,4 +829,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/AvatarPropertyPage.xaml.cs b/src/Snap.Hutao/Snap.Hutao/View/Page/AvatarPropertyPage.xaml.cs
index fa6eb626..950d8a07 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/AvatarPropertyPage.xaml.cs
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/AvatarPropertyPage.xaml.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Control;
using Snap.Hutao.ViewModel.AvatarProperty;
namespace Snap.Hutao.View.Page;
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/CultivationPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/CultivationPage.xaml
index 799d05f6..8ea27aff 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/CultivationPage.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/CultivationPage.xaml
@@ -1,4 +1,4 @@
-
-
+
@@ -152,7 +153,7 @@
Content=""
FontFamily="{StaticResource SymbolThemeFontFamily}"
Style="{StaticResource ButtonRevealStyle}"
- ToolTipService.ToolTip="{shcm:ResourceString Name=ViewPageCultivationRemoveEntry}"/>
+ ToolTipService.ToolTip="{shuxm:ResourceString Name=ViewPageCultivationRemoveEntry}"/>
@@ -261,41 +262,41 @@
-
+
-
+
+ Icon="{shuxm:FontIcon Glyph=}"
+ Label="{shuxm:ResourceString Name=ViewPageCultivationRefreshInventory}"/>
+ Icon="{shuxm:FontIcon Glyph=}"
+ Label="{shuxm:ResourceString Name=ViewPageCultivationAddProject}"/>
+ Icon="{shuxm:FontIcon Glyph=}"
+ Label="{shuxm:ResourceString Name=ViewPageCultivationRemoveProject}"/>
-
+
-
+
-
@@ -303,7 +304,7 @@
-
+
@@ -342,33 +343,33 @@
0
0
-
@@ -376,7 +377,7 @@
-
+
@@ -387,7 +388,7 @@
ItemTemplate="{StaticResource InventoryItemTemplate}"
ItemsSource="{Binding InventoryItems}">
-
+
@@ -408,7 +409,7 @@
Padding="16"
Style="{ThemeResource AcrylicBorderCardStyle}">
-
@@ -416,14 +417,14 @@
Margin="0,16,0,0"
HorizontalAlignment="Center"
Style="{StaticResource SubtitleTextBlockStyle}"
- Text="{shcm:ResourceString Name=ViewPageCultivationAddProjectContinue}"/>
+ Text="{shuxm:ResourceString Name=ViewPageCultivationAddProjectContinue}"/>
@@ -431,4 +432,4 @@
-
+
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/CultivationPage.xaml.cs b/src/Snap.Hutao/Snap.Hutao/View/Page/CultivationPage.xaml.cs
index dd2ebc8e..70faee39 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/CultivationPage.xaml.cs
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/CultivationPage.xaml.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Control;
using Snap.Hutao.ViewModel.Cultivation;
namespace Snap.Hutao.View.Page;
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml
index 067eebb3..02348c6a 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml
@@ -1,4 +1,4 @@
-
-
+
+ ToolTipService.ToolTip="{shuxm:ResourceString Name=ViewPageDailyNoteAddEntryToolTip}"/>
@@ -100,7 +100,7 @@
CommandParameter="{Binding}"
Content="{StaticResource FontIconContentDelete}"
FontFamily="{StaticResource SymbolThemeFontFamily}"
- ToolTipService.ToolTip="{shcm:ResourceString Name=ViewPageDailyNoteRemoveToolTip}"/>
+ ToolTipService.ToolTip="{shuxm:ResourceString Name=ViewPageDailyNoteRemoveToolTip}"/>
+ ToolTipService.ToolTip="{shuxm:ResourceString Name=ViewPageDailyNoteNotificationSetting}"/>
@@ -134,7 +134,7 @@
Maximum="{Binding ArchonQuestView.Ids.Count, Mode=OneWay}"
Opacity="{StaticResource LargeBackgroundProgressBarOpacity}"
Value="{Binding ArchonQuestView.ProgressValue, Mode=OneWay}"/>
-
-
-
-
@@ -312,7 +312,7 @@
Maximum="{Binding DailyNote.ResinDiscountNumLimit, Mode=OneWay}"
Opacity="{ThemeResource LargeBackgroundProgressBarOpacity}"
Value="{Binding DailyNote.ResinDiscountUsedNum, Mode=OneWay}"/>
-
@@ -349,7 +349,7 @@
Maximum="604800"
Opacity="{StaticResource LargeBackgroundProgressBarOpacity}"
Value="{Binding DailyNote.Transformer.RecoveryTime.TotalSeconds, Mode=OneWay}"/>
-
-
@@ -442,12 +442,12 @@
+ Icon="{shuxm:FontIcon Glyph={StaticResource FontIconContentRefresh}}"
+ Label="{shuxm:ResourceString Name=ViewPageDailyNoteRefresh}"/>
+ Icon="{shuxm:FontIcon Glyph=}"
+ Label="{shuxm:ResourceString Name=ViewPageDailyNoteVerify}">
-
+
+ Text="{shuxm:ResourceString Name=ViewPageDailyNoteAddEntryHint}"/>
@@ -476,7 +476,7 @@
-
+
@@ -492,19 +492,19 @@
+ Text="{shuxm:ResourceString Name=ViewPageDailyNoteSettingRefreshHeader}"/>
+ Description="{shuxm:ResourceString Name=ViewPageDailyNoteSettingAutoRefreshDescription}"
+ Header="{shuxm:ResourceString Name=ViewPageDailyNoteSettingAutoRefresh}"
+ HeaderIcon="{shuxm:FontIcon Glyph=}">
-
+
@@ -529,36 +529,36 @@
HorizontalContentAlignment="Stretch"
IsEnabled="{Binding RuntimeOptions.IsToastAvailable}">
-
+
+ Description="{shuxm:ResourceString Name=ViewPageDailyNoteSlientModeDescription}"
+ Header="{shuxm:ResourceString Name=ViewPageDailyNoteSlientModeHeader}"
+ HeaderIcon="{shuxm:FontIcon Glyph=}">
+ Description="{shuxm:ResourceString Name=ViewPageDailyNoteReminderDescription}"
+ Header="{shuxm:ResourceString Name=ViewPageDailyNoteReminderHeader}"
+ HeaderIcon="{shuxm:FontIcon Glyph=}">
-
+
@@ -592,4 +592,4 @@
-
+
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml.cs b/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml.cs
index c65bf954..07120f0f 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml.cs
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Control;
using Snap.Hutao.ViewModel.DailyNote;
namespace Snap.Hutao.View.Page;
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/FeedbackPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/FeedbackPage.xaml
index d2259ace..73cb6a53 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/FeedbackPage.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/FeedbackPage.xaml
@@ -1,4 +1,4 @@
-
-
+
-
+
@@ -55,29 +55,29 @@
-
-
+
+
-
+
@@ -85,28 +85,28 @@
@@ -115,22 +115,22 @@
@@ -145,71 +145,71 @@
Padding="{ThemeResource SettingsExpanderItemHasIconPadding}"
Command="{Binding NavigateToUriCommand}"
CommandParameter="https://hut.ao/features/wish-export.html"
- Header="{shcm:ResourceString Name=ViewGachaLogHeader}"
- HeaderIcon="{shcm:BitmapIcon Source=ms-appx:///Resource/Navigation/GachaLog.png}"
+ Header="{shuxm:ResourceString Name=ViewGachaLogHeader}"
+ HeaderIcon="{shuxm:BitmapIcon Source=ms-appx:///Resource/Navigation/GachaLog.png}"
IsClickEnabled="True"/>
@@ -234,8 +234,8 @@
Margin="0,0,0,8"
HorizontalAlignment="Stretch"
VerticalContentAlignment="Center"
- PlaceholderText="{shcm:ResourceString Name=ViewPageFeedbackAutoSuggestBoxPlaceholder}"
- QueryIcon="{shcm:FontIcon Glyph=}"
+ PlaceholderText="{shuxm:ResourceString Name=ViewPageFeedbackAutoSuggestBoxPlaceholder}"
+ QueryIcon="{shuxm:FontIcon Glyph=}"
Style="{StaticResource DefaultAutoSuggestBoxStyle}"
Text="{Binding SearchText, Mode=TwoWay}">
@@ -248,7 +248,7 @@
Grid.Row="1"
VerticalAlignment="Center"
Visibility="{Binding SearchResults.Count, Converter={StaticResource Int32ToVisibilityRevertConverter}}">
-
@@ -256,7 +256,7 @@
Margin="0,5,0,21"
HorizontalAlignment="Center"
Style="{StaticResource SubtitleTextBlockStyle}"
- Text="{shcm:ResourceString Name=ViewPageFeedbackSearchResultPlaceholderTitle}"/>
+ Text="{shuxm:ResourceString Name=ViewPageFeedbackSearchResultPlaceholderTitle}"/>
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/FeedbackPage.xaml.cs b/src/Snap.Hutao/Snap.Hutao/View/Page/FeedbackPage.xaml.cs
index d61c4a05..d69a9d8e 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/FeedbackPage.xaml.cs
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/FeedbackPage.xaml.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Control;
using Snap.Hutao.ViewModel.Feedback;
namespace Snap.Hutao.View.Page;
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/GachaLogPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/GachaLogPage.xaml
index 2be3cac2..c63dd519 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/GachaLogPage.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/GachaLogPage.xaml
@@ -1,4 +1,4 @@
-
-
-
+
+
@@ -89,7 +90,7 @@
Content=""
FontFamily="{StaticResource SymbolThemeFontFamily}"
Style="{StaticResource ButtonRevealStyle}"
- ToolTipService.ToolTip="{shcm:ResourceString Name=ViewPageGachaLogHutaoCloudRetrieve}"/>
+ ToolTipService.ToolTip="{shuxm:ResourceString Name=ViewPageGachaLogHutaoCloudRetrieve}"/>
+ ToolTipService.ToolTip="{shuxm:ResourceString Name=ViewPageGachaLogHutaoCloudDelete}"/>
@@ -112,7 +113,7 @@
HorizontalAlignment="Stretch"
Command="{Binding HutaoCloudViewModel.UploadCommand}"
CommandParameter="{Binding SelectedArchive}"
- Content="{shcm:ResourceString Name=ViewPageGachaLogHutaoCloudUpload}"/>
+ Content="{shuxm:ResourceString Name=ViewPageGachaLogHutaoCloudUpload}"/>
@@ -125,17 +126,17 @@
@@ -237,13 +238,13 @@
-
+
-
+
@@ -251,58 +252,58 @@
0
-
+
+ Icon="{shuxm:FontIcon Glyph=}"
+ Text="{shuxm:ResourceString Name=ViewPageGachaLogRefreshBySToken}"/>
+ Icon="{shuxm:FontIcon Glyph=}"
+ Text="{shuxm:ResourceString Name=ViewPageGachaLogRefreshByWebCache}"/>
+ Icon="{shuxm:FontIcon Glyph=}"
+ Text="{shuxm:ResourceString Name=ViewPageGachaLogRefreshByManualInput}"/>
+ Text="{shuxm:ResourceString Name=ViewPageGachaLogAggressiveRefresh}"/>
+ Icon="{shuxm:FontIcon Glyph=}"
+ Label="{shuxm:ResourceString Name=ViewPageGachaLogHutaoCloud}"/>
+ Icon="{shuxm:FontIcon Glyph=}"
+ Label="{shuxm:ResourceString Name=ViewPageGachaLogImportAction}"/>
+ Icon="{shuxm:FontIcon Glyph=}"
+ Label="{shuxm:ResourceString Name=ViewPageGachaLogExportAction}"/>
+ Icon="{shuxm:FontIcon Glyph=}"
+ Label="{shuxm:ResourceString Name=ViewPageGachaLogRemoveArchiveAction}"/>
-
+
-
@@ -310,10 +311,10 @@
-
+
-
+
-
-
+
@@ -399,7 +400,7 @@
+ Text="{shuxm:ResourceString Name=ViewControlStatisticsCardOrangeText}"/>
+ Text="{shuxm:ResourceString Name=ViewControlStatisticsCardPurpleText}"/>
-
+
@@ -434,7 +435,7 @@
+ Text="{shuxm:ResourceString Name=ViewControlStatisticsCardOrangeText}"/>
+ Text="{shuxm:ResourceString Name=ViewControlStatisticsCardPurpleText}"/>
+ Text="{shuxm:ResourceString Name=ViewControlStatisticsCardBlueText}"/>
-
+
-
@@ -490,7 +491,7 @@
-
+
@@ -505,46 +506,46 @@
Padding="16"
Style="{ThemeResource AcrylicBorderCardStyle}">
-
+
+ Text="{shuxm:ResourceString Name=ViewPageGachaLogHint}"/>
@@ -558,4 +559,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/GachaLogPage.xaml.cs b/src/Snap.Hutao/Snap.Hutao/View/Page/GachaLogPage.xaml.cs
index 07e1b429..5a0d74cf 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/GachaLogPage.xaml.cs
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/GachaLogPage.xaml.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Control;
using Snap.Hutao.ViewModel.GachaLog;
namespace Snap.Hutao.View.Page;
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml
index 9f942b21..5072d56e 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml
@@ -1,4 +1,4 @@
-
-
+
Collapsed
@@ -33,7 +32,7 @@
+ Header="{shuxm:ResourceString Name=ViewPageLaunchGameResourceDiffHeader}"/>
@@ -50,7 +49,7 @@
+ Text="{Binding AttachUid, TargetNullValue={shuxm:ResourceString Name=ViewPageLaunchGameSwitchAccountAttachUidNull}}"/>
+ ToolTipService.ToolTip="{shuxm:ResourceString Name=ViewPageLaunchGameSwitchAccountAttachUidToolTip}"/>
+ ToolTipService.ToolTip="{shuxm:ResourceString Name=ViewPageLaunchGameSwitchAccountRenameToolTip}"/>
+ ToolTipService.ToolTip="{shuxm:ResourceString Name=ViewPageLaunchGameSwitchAccountRemoveToolTip}"/>
@@ -108,7 +107,7 @@
CommandParameter="{Binding}"
Content=""
FontFamily="{StaticResource SymbolThemeFontFamily}"
- ToolTipService.ToolTip="{shcm:ResourceString Name=ViewPageLaunchGameSwitchAccountRemoveToolTip}"/>
+ ToolTipService.ToolTip="{shuxm:ResourceString Name=ViewPageLaunchGameSwitchAccountRemoveToolTip}"/>
@@ -126,26 +125,26 @@
+ Icon="{shuxm:FontIcon Glyph=}"
+ Label="{shuxm:ResourceString Name=ViewPageOpenScreenshotFolderAction}"/>
+ Icon="{shuxm:FontIcon Glyph=}"
+ Label="{shuxm:ResourceString Name=ViewPageResetGamePathAction}"/>
+ Icon="{shuxm:FontIcon Glyph=}"
+ Label="{shuxm:ResourceString Name=ViewPageLaunchGameAction}"/>
-
+
@@ -155,30 +154,30 @@
+ Text="{shuxm:ResourceString Name=ViewPageLaunchGameFileHeader}"/>
-
+
+ Text="{shuxm:ResourceString Name=ViewPageLaunchGameSwitchSchemeWarning}"/>
-
+
-
+
@@ -192,13 +191,13 @@
+ Text="{shuxm:ResourceString Name=ViewPageLaunchGameRegistryHeader}"/>
+ Description="{shuxm:ResourceString Name=ViewPageLaunchGameWindowsHDRDescription}"
+ Header="{shuxm:ResourceString Name=ViewPageLaunchGameWindowsHDRHeader}"
+ HeaderIcon="{shuxm:FontIcon Glyph=}">
@@ -235,37 +234,37 @@
+ Text="{shuxm:ResourceString Name=ViewPageLaunchGameProcessHeader}"/>
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+ Content="{shuxm:ResourceString Name=ViewModelLaunchGameIdentifyMonitorsAction}"/>
+
-
+
@@ -308,9 +307,9 @@
@@ -325,8 +324,8 @@
+ OffContent="{shuxm:ResourceString Name=ViewPageLaunchGameUnlockFpsOff}"
+ OnContent="{shuxm:ResourceString Name=ViewPageLaunchGameUnlockFpsOn}"/>
@@ -339,23 +338,23 @@
+ Text="{shuxm:ResourceString Name=ViewPageLaunchGameInterProcessHeader}"/>
+ Description="{shuxm:ResourceString Name=ViewPageLaunchGamePlayTimeDescription}"
+ Header="{shuxm:ResourceString Name=ViewPageLaunchGamePlayTimeHeader}"
+ HeaderIcon="{shuxm:FontIcon Glyph=}">
+ Description="{shuxm:ResourceString Name=ViewPageLaunchGameBetterGIDescription}"
+ Header="{shuxm:ResourceString Name=ViewPageLaunchGameBetterGIHeader}"
+ HeaderIcon="{shuxm:FontIcon Glyph=}">
+ Description="{shuxm:ResourceString Name=ViewPageLaunchGameDiscordActivityDescription}"
+ Header="{shuxm:ResourceString Name=ViewPageLaunchGameDiscordActivityHeader}"
+ HeaderIcon="{shuxm:FontIcon Glyph=}">
@@ -364,7 +363,7 @@
-
+
@@ -373,7 +372,7 @@
@@ -387,7 +386,7 @@
+ Header="{shuxm:ResourceString Name=ViewPageLaunchGameResourceLatestHeader}"/>
-
@@ -419,7 +418,7 @@
Margin="0,5,0,21"
HorizontalAlignment="Center"
Style="{StaticResource SubtitleTextBlockStyle}"
- Text="{shcm:ResourceString Name=ViewPageLaunchGameSelectGamePath}"/>
+ Text="{shuxm:ResourceString Name=ViewPageLaunchGameSelectGamePath}"/>
-
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml.cs b/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml.cs
index 504af990..5008dbfe 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml.cs
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Control;
using Snap.Hutao.ViewModel.Game;
namespace Snap.Hutao.View.Page;
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/LoginHoyoverseUserPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/LoginHoyoverseUserPage.xaml
index 2528259b..6ad7f282 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/LoginHoyoverseUserPage.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/LoginHoyoverseUserPage.xaml
@@ -4,7 +4,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:shcm="using:Snap.Hutao.Control.Markup"
+ xmlns:shuxm="using:Snap.Hutao.UI.Xaml.Markup"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
mc:Ignorable="d">
@@ -19,14 +19,14 @@
-
-
+
+
+ Content="{shuxm:ResourceString Name=ViewPageLoginMihoyoUserLoggedInAction}"/>
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/LoginMihoyoUserPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/LoginMihoyoUserPage.xaml
index 788efe1b..6a762798 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/LoginMihoyoUserPage.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/LoginMihoyoUserPage.xaml
@@ -4,7 +4,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:shcm="using:Snap.Hutao.Control.Markup"
+ xmlns:shuxm="using:Snap.Hutao.UI.Xaml.Markup"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
mc:Ignorable="d">
@@ -19,14 +19,14 @@
-
-
+
+
+ Content="{shuxm:ResourceString Name=ViewPageLoginMihoyoUserLoggedInAction}"/>
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/SettingPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/SettingPage.xaml
index f3bd65ca..1473f54e 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/SettingPage.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/SettingPage.xaml
@@ -1,4 +1,4 @@
-
@@ -144,22 +143,22 @@
@@ -198,7 +197,7 @@
-
+
-
+
-
+
@@ -642,7 +641,7 @@
@@ -659,7 +658,7 @@
+ Text="{shuxm:ResourceString Name=ViewPageWiKiAvatarSpecialFoodTitle}"/>
+ Text="{shuxm:ResourceString Name=ViewPageWiKiAvatarOriginalFoodTitle}"/>
@@ -747,7 +746,7 @@
@@ -765,7 +764,7 @@
-
@@ -773,7 +772,7 @@
Margin="0,5,0,21"
HorizontalAlignment="Center"
Style="{StaticResource SubtitleTextBlockStyle}"
- Text="{shcm:ResourceString Name=ControlAutoSuggestBoxNotFoundValue}"/>
+ Text="{shuxm:ResourceString Name=ControlAutoSuggestBoxNotFoundValue}"/>
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/WikiAvatarPage.xaml.cs b/src/Snap.Hutao/Snap.Hutao/View/Page/WikiAvatarPage.xaml.cs
index a3ad6ff2..32dc3753 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/WikiAvatarPage.xaml.cs
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/WikiAvatarPage.xaml.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Control;
using Snap.Hutao.ViewModel.Wiki;
namespace Snap.Hutao.View.Page;
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/WikiMonsterPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/WikiMonsterPage.xaml
index a7e71b71..3e7139d1 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/WikiMonsterPage.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/WikiMonsterPage.xaml
@@ -1,4 +1,4 @@
-
-
-
@@ -142,7 +141,7 @@
VerticalAlignment="Center"
Style="{StaticResource SubtitleTextBlockStyle}"
Text="{Binding Selected.Title}"/>
-
-
+
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/WikiMonsterPage.xaml.cs b/src/Snap.Hutao/Snap.Hutao/View/Page/WikiMonsterPage.xaml.cs
index 2610c647..e2dcf8c7 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/WikiMonsterPage.xaml.cs
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/WikiMonsterPage.xaml.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Control;
using Snap.Hutao.ViewModel.Wiki;
namespace Snap.Hutao.View.Page;
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/WikiWeaponPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/WikiWeaponPage.xaml
index fdb4d987..a441b272 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/WikiWeaponPage.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/WikiWeaponPage.xaml
@@ -1,4 +1,4 @@
-
-
-
-
-
-
+
+
-
-
+
+
@@ -170,13 +169,13 @@
BorderThickness="0"
DefaultLabelPosition="Right">
-
-
-
+
-
-
+
+
+ Icon="{shuxm:FontIcon Glyph=}"
+ Label="{shuxm:ResourceString Name=ViewPageWiKiGeneralAddToDevPlanButtonLabel}"/>
@@ -240,7 +239,7 @@
-
@@ -248,7 +247,7 @@
Margin="0,5,0,21"
HorizontalAlignment="Center"
Style="{StaticResource SubtitleTextBlockStyle}"
- Text="{shcm:ResourceString Name=ControlAutoSuggestBoxNotFoundValue}"/>
+ Text="{shuxm:ResourceString Name=ControlAutoSuggestBoxNotFoundValue}"/>
@@ -268,11 +267,11 @@
Margin="16"
VerticalScrollBarVisibility="Hidden">
-
+
-
+
@@ -283,7 +282,7 @@
-
+ Text="{shuxm:ResourceString Name=ViewPageWiKiAvatarAscensionMaterialsHeader}"/>
@@ -343,7 +342,7 @@
Style="{ThemeResource BorderCardStyle}"
Visibility="{Binding Selected.CollocationView, Converter={StaticResource EmptyObjectToVisibilityConverter}}">
-
+
@@ -369,7 +368,7 @@
-
@@ -377,7 +376,7 @@
Margin="0,5,0,21"
HorizontalAlignment="Center"
Style="{StaticResource SubtitleTextBlockStyle}"
- Text="{shcm:ResourceString Name=ControlAutoSuggestBoxNotFoundValue}"/>
+ Text="{shuxm:ResourceString Name=ControlAutoSuggestBoxNotFoundValue}"/>
-
+
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/WikiWeaponPage.xaml.cs b/src/Snap.Hutao/Snap.Hutao/View/Page/WikiWeaponPage.xaml.cs
index 2f7aed1a..c110c2e7 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/WikiWeaponPage.xaml.cs
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/WikiWeaponPage.xaml.cs
@@ -1,7 +1,7 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml.Control;
using Snap.Hutao.ViewModel.Wiki;
namespace Snap.Hutao.View.Page;
diff --git a/src/Snap.Hutao/Snap.Hutao/View/TitleView.xaml b/src/Snap.Hutao/Snap.Hutao/View/TitleView.xaml
index d6930b9d..f3d9a965 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/TitleView.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/TitleView.xaml
@@ -5,8 +5,8 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mxi="using:Microsoft.Xaml.Interactivity"
- xmlns:shcm="using:Snap.Hutao.Control.Markup"
xmlns:shuxb="using:Snap.Hutao.UI.Xaml.Behavior"
+ xmlns:shuxm="using:Snap.Hutao.UI.Xaml.Markup"
xmlns:shv="using:Snap.Hutao.ViewModel"
Height="44"
VerticalAlignment="Top"
@@ -53,7 +53,7 @@
+ Text="{shuxm:ResourceString Name=ViewTitleAutoClicking}"/>
-
+
@@ -126,7 +126,7 @@
Content="{StaticResource FontIconContentCopy}"
FontFamily="{StaticResource SymbolThemeFontFamily}"
Style="{StaticResource ButtonRevealStyle}"
- ToolTipService.ToolTip="{shcm:ResourceString Name=ViewUserCopyCookieAction}"/>
+ ToolTipService.ToolTip="{shuxm:ResourceString Name=ViewUserCopyCookieAction}"/>
+ ToolTipService.ToolTip="{shuxm:ResourceString Name=ViewUserRemoveAction}"/>
@@ -238,7 +238,7 @@
Grid.Column="1"
Margin="1,0,0,0"
VerticalAlignment="Center"
- Text="{Binding SelectedUser.UserInfo.Nickname, Mode=OneWay, FallbackValue={shcm:ResourceString Name=ViewUserNoUserHint}}"
+ Text="{Binding SelectedUser.UserInfo.Nickname, Mode=OneWay, FallbackValue={shuxm:ResourceString Name=ViewUserNoUserHint}}"
TextTrimming="CharacterEllipsis"
TextWrapping="NoWrap"/>
-
+ Text="{shuxm:ResourceString Name=ViewUserCookieOperation}"/>
+
+ Label="{shuxm:ResourceString Name=ViewUserCookieOperationLoginMihoyoUserAction}"/>
+ Icon="{shuxm:FontIcon Glyph={StaticResource FontIconContentQRCode}}"
+ Label="{shuxm:ResourceString Name=ViewUserCookieOperationLoginQRCodeAction}"/>
+ Icon="{shuxm:FontIcon Glyph={StaticResource FontIconContentAdd}}"
+ Label="{shuxm:ResourceString Name=ViewUserCookieOperationManualInputAction}"/>
+ Text="{shuxm:ResourceString Name=ViewUserCookieOperation2}"/>
+ Icon="{shuxm:FontIcon Glyph={StaticResource FontIconContentWebsite}}"
+ Label="{shuxm:ResourceString Name=ViewUserCookieOperationLoginMihoyoUserAction}"/>
+ Icon="{shuxm:FontIcon Glyph={StaticResource FontIconContentAdd}}"
+ Label="{shuxm:ResourceString Name=ViewUserCookieOperationManualInputAction}"/>
+ Text="{shuxm:ResourceString Name=ViewUserCookieOperation3}"/>
+ Icon="{shuxm:FontIcon Glyph={StaticResource FontIconContentRefresh}}"
+ Label="{shuxm:ResourceString Name=ViewUserCookieOperationRefreshCookieAction}"/>
@@ -389,7 +389,7 @@
+ Text="{shuxm:ResourceString Name=ViewUserRole}"/>
+ Text="{shuxm:ResourceString Name=ViewUserUser}"/>
diff --git a/src/Snap.Hutao/Snap.Hutao/ViewModel/AvatarProperty/AvatarPropertyViewModel.cs b/src/Snap.Hutao/Snap.Hutao/ViewModel/AvatarProperty/AvatarPropertyViewModel.cs
index 30555cf6..dec9391a 100644
--- a/src/Snap.Hutao/Snap.Hutao/ViewModel/AvatarProperty/AvatarPropertyViewModel.cs
+++ b/src/Snap.Hutao/Snap.Hutao/ViewModel/AvatarProperty/AvatarPropertyViewModel.cs
@@ -5,8 +5,8 @@ using CommunityToolkit.Mvvm.Messaging;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media.Imaging;
-using Snap.Hutao.Control.Media;
using Snap.Hutao.Core.ExceptionService;
+using Snap.Hutao.Core.Graphics.Imaging;
using Snap.Hutao.Core.IO.DataTransfer;
using Snap.Hutao.Factory.ContentDialog;
using Snap.Hutao.Message;
@@ -16,6 +16,7 @@ using Snap.Hutao.Service.AvatarInfo;
using Snap.Hutao.Service.Cultivation;
using Snap.Hutao.Service.Notification;
using Snap.Hutao.Service.User;
+using Snap.Hutao.UI;
using Snap.Hutao.UI.Xaml.Control;
using Snap.Hutao.View.Dialog;
using Snap.Hutao.ViewModel.User;
diff --git a/src/Snap.Hutao/Snap.Hutao/ViewModel/IBackgroundImagePresenterAccessor.cs b/src/Snap.Hutao/Snap.Hutao/ViewModel/IBackgroundImagePresenterAccessor.cs
index cf73f768..953ea76e 100644
--- a/src/Snap.Hutao/Snap.Hutao/ViewModel/IBackgroundImagePresenterAccessor.cs
+++ b/src/Snap.Hutao/Snap.Hutao/ViewModel/IBackgroundImagePresenterAccessor.cs
@@ -2,7 +2,7 @@
// Licensed under the MIT license.
using Microsoft.UI.Xaml.Controls;
-using Snap.Hutao.Control;
+using Snap.Hutao.UI.Xaml;
namespace Snap.Hutao.ViewModel;
diff --git a/src/Snap.Hutao/Snap.Hutao/ViewModel/MainViewModel.cs b/src/Snap.Hutao/Snap.Hutao/ViewModel/MainViewModel.cs
index 8a9ab07f..fb052a64 100644
--- a/src/Snap.Hutao/Snap.Hutao/ViewModel/MainViewModel.cs
+++ b/src/Snap.Hutao/Snap.Hutao/ViewModel/MainViewModel.cs
@@ -5,10 +5,10 @@ using CommunityToolkit.Mvvm.Messaging;
using CommunityToolkit.WinUI.Animations;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media.Animation;
-using Snap.Hutao.Control.Theme;
using Snap.Hutao.Message;
using Snap.Hutao.Service;
using Snap.Hutao.Service.BackgroundImage;
+using Snap.Hutao.UI.Xaml.Control.Theme;
using Snap.Hutao.UI.Xaml.Media.Animation;
using System.Globalization;
diff --git a/src/Snap.Hutao/Snap.Hutao/ViewModel/Wiki/AvatarFilter.cs b/src/Snap.Hutao/Snap.Hutao/ViewModel/Wiki/AvatarFilter.cs
index 7afc1345..be18845b 100644
--- a/src/Snap.Hutao/Snap.Hutao/ViewModel/Wiki/AvatarFilter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/ViewModel/Wiki/AvatarFilter.cs
@@ -3,7 +3,7 @@
using Snap.Hutao.Model.Intrinsic.Frozen;
using Snap.Hutao.Model.Metadata.Avatar;
-using Snap.Hutao.UI.Xaml.Control.Tokenizing;
+using Snap.Hutao.UI.Xaml.Control.AutoSuggestBox;
using System.Collections.ObjectModel;
namespace Snap.Hutao.ViewModel.Wiki;
diff --git a/src/Snap.Hutao/Snap.Hutao/ViewModel/Wiki/WeaponFilter.cs b/src/Snap.Hutao/Snap.Hutao/ViewModel/Wiki/WeaponFilter.cs
index cebbd439..bd417e11 100644
--- a/src/Snap.Hutao/Snap.Hutao/ViewModel/Wiki/WeaponFilter.cs
+++ b/src/Snap.Hutao/Snap.Hutao/ViewModel/Wiki/WeaponFilter.cs
@@ -3,7 +3,7 @@
using Snap.Hutao.Model.Intrinsic.Frozen;
using Snap.Hutao.Model.Metadata.Weapon;
-using Snap.Hutao.UI.Xaml.Control.Tokenizing;
+using Snap.Hutao.UI.Xaml.Control.AutoSuggestBox;
using System.Collections.ObjectModel;
namespace Snap.Hutao.ViewModel.Wiki;
diff --git a/src/Snap.Hutao/Snap.Hutao/ViewModel/Wiki/WikiAvatarViewModel.cs b/src/Snap.Hutao/Snap.Hutao/ViewModel/Wiki/WikiAvatarViewModel.cs
index a59215db..3edc3837 100644
--- a/src/Snap.Hutao/Snap.Hutao/ViewModel/Wiki/WikiAvatarViewModel.cs
+++ b/src/Snap.Hutao/Snap.Hutao/ViewModel/Wiki/WikiAvatarViewModel.cs
@@ -17,7 +17,7 @@ using Snap.Hutao.Service.Hutao;
using Snap.Hutao.Service.Metadata;
using Snap.Hutao.Service.Notification;
using Snap.Hutao.Service.User;
-using Snap.Hutao.UI.Xaml.Control.Tokenizing;
+using Snap.Hutao.UI.Xaml.Control.AutoSuggestBox;
using Snap.Hutao.UI.Xaml.Data;
using Snap.Hutao.View.Dialog;
using Snap.Hutao.ViewModel.User;
diff --git a/src/Snap.Hutao/Snap.Hutao/ViewModel/Wiki/WikiWeaponViewModel.cs b/src/Snap.Hutao/Snap.Hutao/ViewModel/Wiki/WikiWeaponViewModel.cs
index 6f14b0a4..62942192 100644
--- a/src/Snap.Hutao/Snap.Hutao/ViewModel/Wiki/WikiWeaponViewModel.cs
+++ b/src/Snap.Hutao/Snap.Hutao/ViewModel/Wiki/WikiWeaponViewModel.cs
@@ -17,7 +17,7 @@ using Snap.Hutao.Service.Hutao;
using Snap.Hutao.Service.Metadata;
using Snap.Hutao.Service.Notification;
using Snap.Hutao.Service.User;
-using Snap.Hutao.UI.Xaml.Control.Tokenizing;
+using Snap.Hutao.UI.Xaml.Control.AutoSuggestBox;
using Snap.Hutao.UI.Xaml.Data;
using Snap.Hutao.View.Dialog;
using Snap.Hutao.ViewModel.User;