mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
Merge pull request #1500 from DGP-Studio/feat/suggestbox_not_found
This commit is contained in:
@@ -7,6 +7,7 @@ using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||
using Snap.Hutao.Control.Extension;
|
||||
using System.Collections;
|
||||
|
||||
namespace Snap.Hutao.Control.AutoSuggestBox;
|
||||
|
||||
@@ -56,7 +57,9 @@ internal sealed partial class AutoSuggestTokenBox : TokenizingTextBox
|
||||
sender.ItemsSource = AvailableTokens
|
||||
.Where(kvp => kvp.Value.Value.Contains(Text, StringComparison.OrdinalIgnoreCase))
|
||||
.OrderBy(kvp => kvp.Value.Kind)
|
||||
.Select(kvp => kvp.Value);
|
||||
.ThenBy(kvp => kvp.Value.Order)
|
||||
.Select(kvp => kvp.Value)
|
||||
.DefaultIfEmpty(SearchToken.NotFound);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,11 +80,23 @@ internal sealed partial class AutoSuggestTokenBox : TokenizingTextBox
|
||||
return;
|
||||
}
|
||||
|
||||
args.Item = AvailableTokens.GetValueOrDefault(args.TokenText) ?? new SearchToken(SearchTokenKind.None, args.TokenText);
|
||||
if (AvailableTokens.GetValueOrDefault(args.TokenText) is { } token)
|
||||
{
|
||||
args.Item = token;
|
||||
}
|
||||
else
|
||||
{
|
||||
args.Cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTokenItemCollectionChanged(TokenizingTextBox sender, object args)
|
||||
{
|
||||
if (args is SearchToken { Kind: SearchTokenKind.None } token)
|
||||
{
|
||||
((IList)sender.ItemsSource).Remove(token);
|
||||
}
|
||||
|
||||
FilterCommand.TryExecute(FilterCommandParameter);
|
||||
}
|
||||
}
|
||||
@@ -7,13 +7,16 @@ namespace Snap.Hutao.Control.AutoSuggestBox;
|
||||
|
||||
internal sealed class SearchToken
|
||||
{
|
||||
public SearchToken(SearchTokenKind kind, string value, Uri? iconUri = null, Uri? sideIconUri = null, Color? quality = null)
|
||||
public static readonly SearchToken NotFound = new(SearchTokenKind.None, SH.ControlAutoSuggestBoxNotFoundValue, 0);
|
||||
|
||||
public SearchToken(SearchTokenKind kind, string value, int order, Uri? iconUri = null, Uri? sideIconUri = null, Color? quality = null)
|
||||
{
|
||||
Value = value;
|
||||
Kind = kind;
|
||||
IconUri = iconUri;
|
||||
SideIconUri = sideIconUri;
|
||||
Quality = quality;
|
||||
Order = order;
|
||||
}
|
||||
|
||||
public SearchTokenKind Kind { get; }
|
||||
@@ -26,6 +29,8 @@ internal sealed class SearchToken
|
||||
|
||||
public Color? Quality { get; }
|
||||
|
||||
public int Order { get; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Value;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<x:String x:Key="UI_EmotionIcon25">https://api.snapgenshin.com/static/raw/EmotionIcon/UI_EmotionIcon25.png</x:String>
|
||||
<x:String x:Key="UI_EmotionIcon52">https://api.snapgenshin.com/static/raw/EmotionIcon/UI_EmotionIcon52.png</x:String>
|
||||
<x:String x:Key="UI_EmotionIcon71">https://api.snapgenshin.com/static/raw/EmotionIcon/UI_EmotionIcon71.png</x:String>
|
||||
<x:String x:Key="UI_EmotionIcon89">https://api.snapgenshin.com/static/raw/EmotionIcon/UI_EmotionIcon89.png</x:String>
|
||||
<x:String x:Key="UI_EmotionIcon250">https://api.snapgenshin.com/static/raw/EmotionIcon/UI_EmotionIcon250.png</x:String>
|
||||
<x:String x:Key="UI_EmotionIcon271">https://api.snapgenshin.com/static/raw/EmotionIcon/UI_EmotionIcon271.png</x:String>
|
||||
<x:String x:Key="UI_EmotionIcon272">https://api.snapgenshin.com/static/raw/EmotionIcon/UI_EmotionIcon272.png</x:String>
|
||||
|
||||
@@ -11,34 +11,26 @@ namespace Snap.Hutao.Model.Intrinsic.Frozen;
|
||||
[HighQuality]
|
||||
internal static class IntrinsicFrozen
|
||||
{
|
||||
/// <summary>
|
||||
/// 所属地区
|
||||
/// </summary>
|
||||
public static FrozenSet<string> AssociationTypes { get; } = Enum.GetValues<AssociationType>().Select(e => e.GetLocalizedDescriptionOrDefault()).OfType<string>().ToFrozenSet();
|
||||
|
||||
/// <summary>
|
||||
/// 武器类型
|
||||
/// </summary>
|
||||
public static FrozenSet<NameValue<AssociationType>> AssociationTypeNameValues { get; } = Enum.GetValues<AssociationType>().Select(e => new NameValue<AssociationType>(e.GetLocalizedDescriptionOrDefault()!, e)).Where(nv => !string.IsNullOrEmpty(nv.Name)).ToFrozenSet();
|
||||
|
||||
public static FrozenSet<string> WeaponTypes { get; } = Enum.GetValues<WeaponType>().Select(e => e.GetLocalizedDescriptionOrDefault()).OfType<string>().ToFrozenSet();
|
||||
|
||||
/// <summary>
|
||||
/// 物品类型
|
||||
/// </summary>
|
||||
public static FrozenSet<NameValue<WeaponType>> WeaponTypeNameValues { get; } = Enum.GetValues<WeaponType>().Select(e => new NameValue<WeaponType>(e.GetLocalizedDescriptionOrDefault()!, e)).Where(nv => !string.IsNullOrEmpty(nv.Name)).ToFrozenSet();
|
||||
|
||||
public static FrozenSet<string> ItemQualities { get; } = Enum.GetValues<QualityType>().Select(e => e.GetLocalizedDescriptionOrDefault()).OfType<string>().ToFrozenSet();
|
||||
|
||||
/// <summary>
|
||||
/// 身材类型
|
||||
/// </summary>
|
||||
public static FrozenSet<NameValue<QualityType>> ItemQualityNameValues { get; } = Enum.GetValues<QualityType>().Select(e => new NameValue<QualityType>(e.GetLocalizedDescriptionOrDefault()!, e)).Where(nv => !string.IsNullOrEmpty(nv.Name)).ToFrozenSet();
|
||||
|
||||
public static FrozenSet<string> BodyTypes { get; } = Enum.GetValues<BodyType>().Select(e => e.GetLocalizedDescriptionOrDefault()).OfType<string>().ToFrozenSet();
|
||||
|
||||
/// <summary>
|
||||
/// 战斗属性
|
||||
/// </summary>
|
||||
public static FrozenSet<NameValue<BodyType>> BodyTypeNameValues { get; } = Enum.GetValues<BodyType>().Select(e => new NameValue<BodyType>(e.GetLocalizedDescriptionOrDefault()!, e)).Where(nv => !string.IsNullOrEmpty(nv.Name)).ToFrozenSet();
|
||||
|
||||
public static FrozenSet<string> FightProperties { get; } = Enum.GetValues<FightProperty>().Select(e => e.GetLocalizedDescriptionOrDefault()).OfType<string>().ToFrozenSet();
|
||||
|
||||
/// <summary>
|
||||
/// 元素名称
|
||||
/// </summary>
|
||||
public static FrozenSet<NameValue<FightProperty>> FightPropertyNameValues { get; } = Enum.GetValues<FightProperty>().Select(e => new NameValue<FightProperty>(e.GetLocalizedDescriptionOrDefault()!, e)).Where(nv => !string.IsNullOrEmpty(nv.Name)).ToFrozenSet();
|
||||
|
||||
public static FrozenSet<string> ElementNames { get; } = FrozenSet.ToFrozenSet(
|
||||
[
|
||||
SH.ModelIntrinsicElementNameFire,
|
||||
@@ -50,6 +42,17 @@ internal static class IntrinsicFrozen
|
||||
SH.ModelIntrinsicElementNameRock,
|
||||
]);
|
||||
|
||||
public static FrozenSet<NameValue<int>> ElementNameValues { get; } = FrozenSet.ToFrozenSet(
|
||||
[
|
||||
new NameValue<int>(SH.ModelIntrinsicElementNameFire, 1),
|
||||
new NameValue<int>(SH.ModelIntrinsicElementNameWater, 2),
|
||||
new NameValue<int>(SH.ModelIntrinsicElementNameGrass, 3),
|
||||
new NameValue<int>(SH.ModelIntrinsicElementNameElec, 4),
|
||||
new NameValue<int>(SH.ModelIntrinsicElementNameWind, 5),
|
||||
new NameValue<int>(SH.ModelIntrinsicElementNameIce, 6),
|
||||
new NameValue<int>(SH.ModelIntrinsicElementNameRock, 7),
|
||||
]);
|
||||
|
||||
public static FrozenSet<string> MaterialTypeDescriptions { get; } = FrozenSet.ToFrozenSet(
|
||||
[
|
||||
SH.ModelMetadataMaterialCharacterAndWeaponEnhancementMaterial,
|
||||
|
||||
@@ -9,24 +9,6 @@ namespace Snap.Hutao.Model.Metadata.Converter;
|
||||
|
||||
internal sealed class AssociationTypeIconConverter : ValueConverter<AssociationType, Uri?>
|
||||
{
|
||||
private static readonly FrozenDictionary<string, AssociationType> LocalizedNameToAssociationType = FrozenDictionary.ToFrozenDictionary(
|
||||
[
|
||||
KeyValuePair.Create(SH.ModelIntrinsicAssociationTypeMondstadt, AssociationType.ASSOC_TYPE_MONDSTADT),
|
||||
KeyValuePair.Create(SH.ModelIntrinsicAssociationTypeLiyue, AssociationType.ASSOC_TYPE_LIYUE),
|
||||
KeyValuePair.Create(SH.ModelIntrinsicAssociationTypeFatui, AssociationType.ASSOC_TYPE_FATUI),
|
||||
KeyValuePair.Create(SH.ModelIntrinsicAssociationTypeInazuma, AssociationType.ASSOC_TYPE_INAZUMA),
|
||||
KeyValuePair.Create(SH.ModelIntrinsicAssociationTypeRanger, AssociationType.ASSOC_TYPE_RANGER),
|
||||
KeyValuePair.Create(SH.ModelIntrinsicAssociationTypeSumeru, AssociationType.ASSOC_TYPE_SUMERU),
|
||||
KeyValuePair.Create(SH.ModelIntrinsicAssociationTypeFontaine, AssociationType.ASSOC_TYPE_FONTAINE),
|
||||
KeyValuePair.Create(SH.ModelIntrinsicAssociationTypeNatlan, AssociationType.ASSOC_TYPE_NATLAN),
|
||||
KeyValuePair.Create(SH.ModelIntrinsicAssociationTypeSnezhnaya, AssociationType.ASSOC_TYPE_SNEZHNAYA),
|
||||
]);
|
||||
|
||||
public static Uri? AssociationTypeNameToIconUri(string associationTypeName)
|
||||
{
|
||||
return AssociationTypeToIconUri(LocalizedNameToAssociationType.GetValueOrDefault(associationTypeName));
|
||||
}
|
||||
|
||||
public static Uri? AssociationTypeToIconUri(AssociationType type)
|
||||
{
|
||||
string? association = type switch
|
||||
|
||||
@@ -144,6 +144,9 @@
|
||||
<data name="ContentDialogSavePrimaryButtonText" xml:space="preserve">
|
||||
<value>Save</value>
|
||||
</data>
|
||||
<data name="ControlAutoSuggestBoxNotFoundValue" xml:space="preserve">
|
||||
<value>No results found</value>
|
||||
</data>
|
||||
<data name="ControlImageCachedImageInvalidResourceUri" xml:space="preserve">
|
||||
<value>Invalid Uri</value>
|
||||
</data>
|
||||
|
||||
@@ -144,6 +144,9 @@
|
||||
<data name="ContentDialogSavePrimaryButtonText" xml:space="preserve">
|
||||
<value>保存</value>
|
||||
</data>
|
||||
<data name="ControlAutoSuggestBoxNotFoundValue" xml:space="preserve">
|
||||
<value>未找到结果</value>
|
||||
</data>
|
||||
<data name="ControlImageCachedImageInvalidResourceUri" xml:space="preserve">
|
||||
<value>无效的 Uri</value>
|
||||
</data>
|
||||
|
||||
@@ -365,367 +365,378 @@
|
||||
|
||||
</SplitView.Pane>
|
||||
<SplitView.Content>
|
||||
<ScrollViewer>
|
||||
<StackPanel
|
||||
Padding="16,16,16,16"
|
||||
HorizontalAlignment="Left"
|
||||
Spacing="16">
|
||||
<!-- 简介 -->
|
||||
<Grid Style="{ThemeResource GridCardStyle}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0" Margin="16">
|
||||
<Grid Margin="0,0,0,12" ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<shci:MonoChrome
|
||||
Grid.Column="0"
|
||||
Width="32"
|
||||
Height="32"
|
||||
HorizontalAlignment="Left"
|
||||
Source="{Binding Selected.FetterInfo.VisionBefore, Converter={StaticResource ElementNameIconConverter}}"/>
|
||||
<shci:MonoChrome
|
||||
Grid.Column="1"
|
||||
Width="32"
|
||||
Height="32"
|
||||
Source="{Binding Selected.Weapon, Converter={StaticResource WeaponTypeIconConverter}}"/>
|
||||
</Grid>
|
||||
<shvcont:ItemIcon
|
||||
Width="128"
|
||||
Height="128"
|
||||
Icon="{Binding Selected.Icon, Converter={StaticResource AvatarIconConverter}, Mode=OneWay}"
|
||||
Quality="{Binding Selected.Quality, Mode=OneWay}"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="1" Margin="16">
|
||||
<StackPanel Margin="0,0,0,2" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="{Binding Selected.Name}"/>
|
||||
<TextBlock
|
||||
Margin="24,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.Title}"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
Opacity="0.7"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.Detail}"
|
||||
TextWrapping="NoWrap"/>
|
||||
|
||||
<cwc:UniformGrid
|
||||
Margin="0,16,0,0"
|
||||
ColumnSpacing="6"
|
||||
Columns="4">
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewPageWiKiAvatarOccupationNameTitle}"/>
|
||||
<TextBlock
|
||||
Margin="0,6,0,0"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.Native}"
|
||||
TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewPageWiKiAvatarConstellationNameTitle}"/>
|
||||
<TextBlock
|
||||
Margin="0,6,0,0"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.ConstellationBefore}"
|
||||
TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewPageWiKiAvatarDateofBirthTitle}"/>
|
||||
<TextBlock
|
||||
Margin="0,6,0,0"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.BirthFormatted}"
|
||||
TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
</cwc:UniformGrid>
|
||||
|
||||
<cwc:UniformGrid
|
||||
Margin="0,12,0,0"
|
||||
ColumnSpacing="6"
|
||||
Columns="4">
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewPageWiKiAvatarChineseCVNameTitle}"/>
|
||||
<TextBlock
|
||||
Margin="0,6,0,0"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.CvChinese}"
|
||||
TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewPageWiKiAvatarJapaneseCVNameTitle}"/>
|
||||
<TextBlock
|
||||
Margin="0,6,0,0"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.CvJapanese}"
|
||||
TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewPageWiKiAvatarEnglishCVNameTitle}"/>
|
||||
<TextBlock
|
||||
Margin="0,6,0,0"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.CvEnglish}"
|
||||
TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewPageWiKiAvatarKoreanCVNameTitle}"/>
|
||||
<TextBlock
|
||||
Margin="0,6,0,0"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.CvKorean}"
|
||||
TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
</cwc:UniformGrid>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="1" Grid.ColumnSpan="2">
|
||||
<ItemsControl
|
||||
Margin="16,0,16,16"
|
||||
ItemTemplate="{StaticResource CultivationItemTemplate}"
|
||||
ItemsSource="{Binding Selected.CultivationItemsView}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<cwc:UniformGrid
|
||||
ColumnSpacing="8"
|
||||
Columns="3"
|
||||
RowSpacing="8"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- 属性 -->
|
||||
<Border Style="{ThemeResource BorderCardStyle}">
|
||||
<Border.Resources>
|
||||
<SolidColorBrush x:Key="ToggleButtonBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ExpanderContentBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundDisabled" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundPointerOver" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundPressed" Color="Transparent"/>
|
||||
</Border.Resources>
|
||||
<shvcont:BaseValueSlider
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
BaseValueInfo="{Binding BaseValueInfo, Mode=OneWay}"/>
|
||||
</Border>
|
||||
|
||||
<!-- 天赋 -->
|
||||
<Border Padding="16" Style="{ThemeResource BorderCardStyle}">
|
||||
<shvcont:SkillPivot ItemTemplate="{StaticResource SkillDataTemplate}" Skills="{Binding Selected.SkillDepot.CompositeSkills}"/>
|
||||
</Border>
|
||||
|
||||
<!-- 命座 -->
|
||||
<Border Padding="16" Style="{ThemeResource BorderCardStyle}">
|
||||
<shvcont:SkillPivot ItemTemplate="{StaticResource TalentDataTemplate}" Skills="{Binding Selected.SkillDepot.Talents}"/>
|
||||
</Border>
|
||||
|
||||
<!-- 搭配 -->
|
||||
<Border Padding="16" Style="{ThemeResource BorderCardStyle}">
|
||||
<Grid ColumnSpacing="8" RowSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Padding="16">
|
||||
<StackPanel VerticalAlignment="Center" Visibility="{Binding Avatars.Count, Converter={StaticResource Int32ToVisibilityRevertConverter}}">
|
||||
<shci:CachedImage
|
||||
Height="120"
|
||||
MinWidth="{ThemeResource SettingsCardContentControlMinWidth}"
|
||||
EnableLazyLoading="False"
|
||||
Source="{StaticResource UI_EmotionIcon89}"/>
|
||||
<TextBlock
|
||||
Margin="0,5,0,21"
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="{shcm:ResourceString Name=ControlAutoSuggestBoxNotFoundValue}"/>
|
||||
</StackPanel>
|
||||
<ScrollViewer Visibility="{Binding Avatars.Count, Converter={StaticResource Int32ToVisibilityConverter}}">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="16">
|
||||
<!-- 简介 -->
|
||||
<Grid Style="{ThemeResource GridCardStyle}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{shcm:ResourceString Name=ViewPageWiKiAvatarTeamCombinationHeader}"/>
|
||||
<ItemsControl
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
ItemTemplate="{StaticResource CollocationTemplate}"
|
||||
ItemsPanel="{StaticResource StackPanelSpacing4Template}"
|
||||
ItemsSource="{Binding Selected.Collocation.Avatars}"/>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{shcm:ResourceString Name=ViewPageWiKiAvatarWeaponCombinationHeader}"/>
|
||||
<ItemsControl
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
ItemTemplate="{StaticResource CollocationTemplate}"
|
||||
ItemsPanel="{StaticResource StackPanelSpacing4Template}"
|
||||
ItemsSource="{Binding Selected.Collocation.Weapons}"/>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{shcm:ResourceString Name=ViewPageWiKiAvatarArtifactSetCombinationHeader}"/>
|
||||
<ItemsControl
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
ItemTemplate="{StaticResource CollocationReliquaryTemplate}"
|
||||
ItemsPanel="{StaticResource StackPanelSpacing4Template}"
|
||||
ItemsSource="{Binding Selected.Collocation.ReliquarySets}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- 立绘 -->
|
||||
<cwc:ConstrainedBox AspectRatio="2048:1024">
|
||||
<Grid Style="{ThemeResource GridCardStyle}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- 使其有较低的ZOrder -->
|
||||
<shci:CachedImage Grid.ColumnSpan="2" Source="{Binding Selected.Icon, Converter={StaticResource GachaAvatarImgConverter}}"/>
|
||||
<StackPanel Grid.Column="0" Margin="16">
|
||||
<Grid Margin="0,0,0,12" ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<shci:MonoChrome
|
||||
Grid.Column="0"
|
||||
Width="32"
|
||||
Height="32"
|
||||
HorizontalAlignment="Left"
|
||||
Source="{Binding Selected.FetterInfo.VisionBefore, Converter={StaticResource ElementNameIconConverter}}"/>
|
||||
<shci:MonoChrome
|
||||
Grid.Column="1"
|
||||
Width="32"
|
||||
Height="32"
|
||||
Source="{Binding Selected.Weapon, Converter={StaticResource WeaponTypeIconConverter}}"/>
|
||||
</Grid>
|
||||
<shvcont:ItemIcon
|
||||
Width="128"
|
||||
Height="128"
|
||||
Icon="{Binding Selected.Icon, Converter={StaticResource AvatarIconConverter}, Mode=OneWay}"
|
||||
Quality="{Binding Selected.Quality, Mode=OneWay}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Border
|
||||
Grid.Column="0"
|
||||
Margin="16"
|
||||
Style="{StaticResource BorderCardStyle}">
|
||||
<cwc:ConstrainedBox AspectRatio="320:1024">
|
||||
<shci:CachedImage CornerRadius="{ThemeResource ControlCornerRadius}" Source="{Binding Selected.Icon, Converter={StaticResource GachaAvatarIconConverter}}"/>
|
||||
</cwc:ConstrainedBox>
|
||||
</Border>
|
||||
<StackPanel Grid.Column="1" Margin="16">
|
||||
<StackPanel Margin="0,0,0,2" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="{Binding Selected.Name}"/>
|
||||
<TextBlock
|
||||
Margin="24,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.Title}"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
Opacity="0.7"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.Detail}"
|
||||
TextWrapping="NoWrap"/>
|
||||
|
||||
<cwc:UniformGrid
|
||||
Margin="0,16,0,0"
|
||||
ColumnSpacing="6"
|
||||
Columns="4">
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewPageWiKiAvatarOccupationNameTitle}"/>
|
||||
<TextBlock
|
||||
Margin="0,6,0,0"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.Native}"
|
||||
TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewPageWiKiAvatarConstellationNameTitle}"/>
|
||||
<TextBlock
|
||||
Margin="0,6,0,0"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.ConstellationBefore}"
|
||||
TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewPageWiKiAvatarDateofBirthTitle}"/>
|
||||
<TextBlock
|
||||
Margin="0,6,0,0"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.BirthFormatted}"
|
||||
TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
</cwc:UniformGrid>
|
||||
|
||||
<cwc:UniformGrid
|
||||
Margin="0,12,0,0"
|
||||
ColumnSpacing="6"
|
||||
Columns="4">
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewPageWiKiAvatarChineseCVNameTitle}"/>
|
||||
<TextBlock
|
||||
Margin="0,6,0,0"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.CvChinese}"
|
||||
TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewPageWiKiAvatarJapaneseCVNameTitle}"/>
|
||||
<TextBlock
|
||||
Margin="0,6,0,0"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.CvJapanese}"
|
||||
TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewPageWiKiAvatarEnglishCVNameTitle}"/>
|
||||
<TextBlock
|
||||
Margin="0,6,0,0"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.CvEnglish}"
|
||||
TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewPageWiKiAvatarKoreanCVNameTitle}"/>
|
||||
<TextBlock
|
||||
Margin="0,6,0,0"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Selected.FetterInfo.CvKorean}"
|
||||
TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
</cwc:UniformGrid>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="1" Grid.ColumnSpan="2">
|
||||
<ItemsControl
|
||||
Margin="16,0,16,16"
|
||||
ItemTemplate="{StaticResource CultivationItemTemplate}"
|
||||
ItemsSource="{Binding Selected.CultivationItemsView}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<cwc:UniformGrid
|
||||
ColumnSpacing="8"
|
||||
Columns="3"
|
||||
RowSpacing="8"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</cwc:ConstrainedBox>
|
||||
|
||||
<!-- 料理 -->
|
||||
<Border Style="{ThemeResource BorderCardStyle}">
|
||||
<Border.Resources>
|
||||
<SolidColorBrush x:Key="ExpanderContentBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ExpanderHeaderBackground" Color="Transparent"/>
|
||||
</Border.Resources>
|
||||
<Expander
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Header="{shcm:ResourceString Name=ViewPageWiKiAvatarFoodHeader}"
|
||||
IsExpanded="True">
|
||||
<Grid DataContext="{Binding Selected.CookBonusView}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- 属性 -->
|
||||
<Border Style="{ThemeResource BorderCardStyle}">
|
||||
<Border.Resources>
|
||||
<SolidColorBrush x:Key="ToggleButtonBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ExpanderContentBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundDisabled" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundPointerOver" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundPressed" Color="Transparent"/>
|
||||
</Border.Resources>
|
||||
<shvcont:BaseValueSlider
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
BaseValueInfo="{Binding BaseValueInfo, Mode=OneWay}"/>
|
||||
</Border>
|
||||
|
||||
<!-- 天赋 -->
|
||||
<Border Padding="16" Style="{ThemeResource BorderCardStyle}">
|
||||
<shvcont:SkillPivot ItemTemplate="{StaticResource SkillDataTemplate}" Skills="{Binding Selected.SkillDepot.CompositeSkills}"/>
|
||||
</Border>
|
||||
|
||||
<!-- 命座 -->
|
||||
<Border Padding="16" Style="{ThemeResource BorderCardStyle}">
|
||||
<shvcont:SkillPivot ItemTemplate="{StaticResource TalentDataTemplate}" Skills="{Binding Selected.SkillDepot.Talents}"/>
|
||||
</Border>
|
||||
|
||||
<!-- 搭配 -->
|
||||
<Border Padding="16" Style="{ThemeResource BorderCardStyle}">
|
||||
<Grid ColumnSpacing="8" RowSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{shcm:ResourceString Name=ViewPageWiKiAvatarTeamCombinationHeader}"/>
|
||||
<ItemsControl
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
ItemTemplate="{StaticResource CollocationTemplate}"
|
||||
ItemsPanel="{StaticResource StackPanelSpacing4Template}"
|
||||
ItemsSource="{Binding Selected.Collocation.Avatars}"/>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{shcm:ResourceString Name=ViewPageWiKiAvatarWeaponCombinationHeader}"/>
|
||||
<ItemsControl
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
ItemTemplate="{StaticResource CollocationTemplate}"
|
||||
ItemsPanel="{StaticResource StackPanelSpacing4Template}"
|
||||
ItemsSource="{Binding Selected.Collocation.Weapons}"/>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{shcm:ResourceString Name=ViewPageWiKiAvatarArtifactSetCombinationHeader}"/>
|
||||
<ItemsControl
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
ItemTemplate="{StaticResource CollocationReliquaryTemplate}"
|
||||
ItemsPanel="{StaticResource StackPanelSpacing4Template}"
|
||||
ItemsSource="{Binding Selected.Collocation.ReliquarySets}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- 立绘 -->
|
||||
<cwc:ConstrainedBox AspectRatio="2048:1024">
|
||||
<Grid Style="{ThemeResource GridCardStyle}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
<!-- 使其有较低的ZOrder -->
|
||||
<shci:CachedImage Grid.ColumnSpan="2" Source="{Binding Selected.Icon, Converter={StaticResource GachaAvatarImgConverter}}"/>
|
||||
|
||||
<Border
|
||||
Grid.Column="0"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{shcm:ResourceString Name=ViewPageWiKiAvatarSpecialFoodTitle}"/>
|
||||
<shvcont:BottomTextControl
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Margin="0,16,0,0"
|
||||
Text="{Binding Item.Name}">
|
||||
<shvcont:ItemIcon Icon="{Binding Item.Icon, Converter={StaticResource ItemIconConverter}}" Quality="{Binding Item.RankLevel}"/>
|
||||
</shvcont:BottomTextControl>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="16,0,0,0"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{shcm:ResourceString Name=ViewPageWiKiAvatarOriginalFoodTitle}"/>
|
||||
<shvcont:BottomTextControl
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="16,16,0,0"
|
||||
Text="{Binding OriginItem.Name}">
|
||||
<shvcont:ItemIcon Icon="{Binding OriginItem.Icon, Converter={StaticResource ItemIconConverter}}" Quality="{Binding OriginItem.RankLevel}"/>
|
||||
</shvcont:BottomTextControl>
|
||||
<StackPanel
|
||||
Grid.RowSpan="4"
|
||||
Grid.Column="2"
|
||||
Margin="16,0,0,0">
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.ColumnSpan="4"
|
||||
Text="{Binding Item.Description}"
|
||||
TextWrapping="Wrap"/>
|
||||
<TextBlock
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="4"
|
||||
Margin="0,16,0,0"
|
||||
Text="{Binding Item.EffectDescription}"
|
||||
TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
Margin="16"
|
||||
Style="{StaticResource BorderCardStyle}">
|
||||
<cwc:ConstrainedBox AspectRatio="320:1024">
|
||||
<shci:CachedImage CornerRadius="{ThemeResource ControlCornerRadius}" Source="{Binding Selected.Icon, Converter={StaticResource GachaAvatarIconConverter}}"/>
|
||||
</cwc:ConstrainedBox>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Expander>
|
||||
</Border>
|
||||
</cwc:ConstrainedBox>
|
||||
|
||||
<!-- 衣装 -->
|
||||
<Border Style="{ThemeResource BorderCardStyle}">
|
||||
<Border.Resources>
|
||||
<SolidColorBrush x:Key="ExpanderContentBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ExpanderHeaderBackground" Color="Transparent"/>
|
||||
</Border.Resources>
|
||||
<Expander
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Header="{shcm:ResourceString Name=ViewPageWiKiAvatarCostumeHeader}"
|
||||
IsExpanded="True">
|
||||
<ItemsControl
|
||||
Margin="0,0,0,-16"
|
||||
ItemTemplate="{StaticResource CostumeTemplate}"
|
||||
ItemsSource="{Binding Selected.Costumes}"/>
|
||||
</Expander>
|
||||
</Border>
|
||||
<!-- 料理 -->
|
||||
<Border Style="{ThemeResource BorderCardStyle}">
|
||||
<Border.Resources>
|
||||
<SolidColorBrush x:Key="ExpanderContentBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ExpanderHeaderBackground" Color="Transparent"/>
|
||||
</Border.Resources>
|
||||
<Expander
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Header="{shcm:ResourceString Name=ViewPageWiKiAvatarFoodHeader}"
|
||||
IsExpanded="True">
|
||||
<Grid DataContext="{Binding Selected.CookBonusView}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{shcm:ResourceString Name=ViewPageWiKiAvatarSpecialFoodTitle}"/>
|
||||
<shvcont:BottomTextControl
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Margin="0,16,0,0"
|
||||
Text="{Binding Item.Name}">
|
||||
<shvcont:ItemIcon Icon="{Binding Item.Icon, Converter={StaticResource ItemIconConverter}}" Quality="{Binding Item.RankLevel}"/>
|
||||
</shvcont:BottomTextControl>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="16,0,0,0"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{shcm:ResourceString Name=ViewPageWiKiAvatarOriginalFoodTitle}"/>
|
||||
<shvcont:BottomTextControl
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="16,16,0,0"
|
||||
Text="{Binding OriginItem.Name}">
|
||||
<shvcont:ItemIcon Icon="{Binding OriginItem.Icon, Converter={StaticResource ItemIconConverter}}" Quality="{Binding OriginItem.RankLevel}"/>
|
||||
</shvcont:BottomTextControl>
|
||||
<StackPanel
|
||||
Grid.RowSpan="4"
|
||||
Grid.Column="2"
|
||||
Margin="16,0,0,0">
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.ColumnSpan="4"
|
||||
Text="{Binding Item.Description}"
|
||||
TextWrapping="Wrap"/>
|
||||
<TextBlock
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="4"
|
||||
Margin="0,16,0,0"
|
||||
Text="{Binding Item.EffectDescription}"
|
||||
TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Expander>
|
||||
</Border>
|
||||
|
||||
<!-- 资料 -->
|
||||
<Border Style="{ThemeResource BorderCardStyle}">
|
||||
<Border.Resources>
|
||||
<SolidColorBrush x:Key="ToggleButtonBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ExpanderContentBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundDisabled" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundPointerOver" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundPressed" Color="Transparent"/>
|
||||
</Border.Resources>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Hidden">
|
||||
<cwc:SettingsExpander
|
||||
Header="{shcm:ResourceString Name=ViewPageWiKiAvatarQuotesHeader}"
|
||||
ItemTemplate="{StaticResource FetterStoryTemplate}"
|
||||
ItemsSource="{Binding Selected.FetterInfo.Fetters}"/>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
<!-- 衣装 -->
|
||||
<Border Style="{ThemeResource BorderCardStyle}">
|
||||
<Border.Resources>
|
||||
<SolidColorBrush x:Key="ExpanderContentBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ExpanderHeaderBackground" Color="Transparent"/>
|
||||
</Border.Resources>
|
||||
<Expander
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Header="{shcm:ResourceString Name=ViewPageWiKiAvatarCostumeHeader}"
|
||||
IsExpanded="True">
|
||||
<ItemsControl
|
||||
Margin="0,0,0,-16"
|
||||
ItemTemplate="{StaticResource CostumeTemplate}"
|
||||
ItemsSource="{Binding Selected.Costumes}"/>
|
||||
</Expander>
|
||||
</Border>
|
||||
|
||||
<!-- 故事 -->
|
||||
<Border Style="{ThemeResource BorderCardStyle}">
|
||||
<Border.Resources>
|
||||
<SolidColorBrush x:Key="ToggleButtonBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ExpanderContentBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundDisabled" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundPointerOver" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundPressed" Color="Transparent"/>
|
||||
</Border.Resources>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Hidden">
|
||||
<cwc:SettingsExpander
|
||||
Header="{shcm:ResourceString Name=ViewPageWiKiAvatarStoriesHeader}"
|
||||
ItemTemplate="{StaticResource FetterStoryTemplate}"
|
||||
ItemsSource="{Binding Selected.FetterInfo.FetterStories}"/>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
<!-- 资料 -->
|
||||
<Border Style="{ThemeResource BorderCardStyle}">
|
||||
<Border.Resources>
|
||||
<SolidColorBrush x:Key="ToggleButtonBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ExpanderContentBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundDisabled" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundPointerOver" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundPressed" Color="Transparent"/>
|
||||
</Border.Resources>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Hidden">
|
||||
<cwc:SettingsExpander
|
||||
Header="{shcm:ResourceString Name=ViewPageWiKiAvatarQuotesHeader}"
|
||||
ItemTemplate="{StaticResource FetterStoryTemplate}"
|
||||
ItemsSource="{Binding Selected.FetterInfo.Fetters}"/>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
|
||||
<!-- 故事 -->
|
||||
<Border Style="{ThemeResource BorderCardStyle}">
|
||||
<Border.Resources>
|
||||
<SolidColorBrush x:Key="ToggleButtonBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ExpanderContentBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackground" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundDisabled" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundPointerOver" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="SettingsCardBackgroundPressed" Color="Transparent"/>
|
||||
</Border.Resources>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Hidden">
|
||||
<cwc:SettingsExpander
|
||||
Header="{shcm:ResourceString Name=ViewPageWiKiAvatarStoriesHeader}"
|
||||
ItemTemplate="{StaticResource FetterStoryTemplate}"
|
||||
ItemsSource="{Binding Selected.FetterInfo.FetterStories}"/>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</SplitView.Content>
|
||||
</SplitView>
|
||||
</Border>
|
||||
@@ -734,19 +745,33 @@
|
||||
<cwc:Case Value="Grid">
|
||||
<Border Margin="16,0,16,16" cw:Effects.Shadow="{ThemeResource CompatCardShadow}">
|
||||
<Border Style="{ThemeResource AcrylicBorderCardStyle}">
|
||||
<GridView
|
||||
Padding="16,16,4,4"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Left"
|
||||
ItemContainerStyle="{StaticResource LargeGridViewItemStyle}"
|
||||
ItemTemplate="{StaticResource AvatarGridTemplate}"
|
||||
ItemsSource="{Binding Avatars}"
|
||||
SelectedItem="{Binding Selected, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<mxi:Interaction.Behaviors>
|
||||
<shcb:SelectedItemInViewBehavior/>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</GridView>
|
||||
<Grid Padding="16,16,4,4">
|
||||
<StackPanel VerticalAlignment="Center" Visibility="{Binding Avatars.Count, Converter={StaticResource Int32ToVisibilityRevertConverter}}">
|
||||
<shci:CachedImage
|
||||
Height="120"
|
||||
MinWidth="{ThemeResource SettingsCardContentControlMinWidth}"
|
||||
EnableLazyLoading="False"
|
||||
Source="{StaticResource UI_EmotionIcon89}"/>
|
||||
<TextBlock
|
||||
Margin="0,5,0,21"
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="{shcm:ResourceString Name=ControlAutoSuggestBoxNotFoundValue}"/>
|
||||
</StackPanel>
|
||||
<GridView
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Left"
|
||||
ItemContainerStyle="{StaticResource LargeGridViewItemStyle}"
|
||||
ItemTemplate="{StaticResource AvatarGridTemplate}"
|
||||
ItemsSource="{Binding Avatars}"
|
||||
SelectedItem="{Binding Selected, Mode=TwoWay}"
|
||||
SelectionMode="Single"
|
||||
Visibility="{Binding Avatars.Count, Converter={StaticResource Int32ToVisibilityConverter}}">
|
||||
<mxi:Interaction.Behaviors>
|
||||
<shcb:SelectedItemInViewBehavior/>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</GridView>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Border>
|
||||
</cwc:Case>
|
||||
|
||||
@@ -233,111 +233,125 @@
|
||||
</ListView>
|
||||
</SplitView.Pane>
|
||||
<SplitView.Content>
|
||||
<ScrollViewer>
|
||||
<StackPanel Padding="16" Spacing="16">
|
||||
<Border Style="{ThemeResource BorderCardStyle}">
|
||||
<Border.Background>
|
||||
<ImageBrush ImageSource="ms-appx:///Resource/Icon/UI_GachaShowPanel_Bg_Weapon.png"/>
|
||||
</Border.Background>
|
||||
<cwc:ConstrainedBox AspectRatio="2048:1024">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.ColumnSpan="2" Background="{ThemeResource DarkOnlyOverlayMaskColorBrush}"/>
|
||||
<ScrollViewer
|
||||
Grid.Column="0"
|
||||
Margin="16"
|
||||
VerticalScrollBarVisibility="Hidden">
|
||||
<StackPanel>
|
||||
<shvc:BottomTextControl MaxWidth="80" Text="{shcm:ResourceString Name=ViewPageWiKiWeaponBeforeAscensionTitle}">
|
||||
<shvc:ItemIcon Icon="{Binding Selected.Icon, Converter={StaticResource EquipIconConverter}}" Quality="{Binding Selected.RankLevel}"/>
|
||||
</shvc:BottomTextControl>
|
||||
|
||||
<shvc:BottomTextControl Margin="0,16,0,0" Text="{shcm:ResourceString Name=ViewPageWiKiWeaponAfterAscensionTitle}">
|
||||
<shvc:ItemIcon Icon="{Binding Selected.AwakenIcon, Converter={StaticResource EquipIconConverter}}" Quality="{Binding Selected.RankLevel}"/>
|
||||
</shvc:BottomTextControl>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
<Grid Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="176*"/>
|
||||
<ColumnDefinition Width="848*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<shci:CachedImage
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Stretch"
|
||||
Source="{Binding Selected.Icon, Converter={StaticResource GachaEquipIconConverter}}"/>
|
||||
</Grid>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="16"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Bottom"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="{Binding Selected.Name}"/>
|
||||
</Grid>
|
||||
</cwc:ConstrainedBox>
|
||||
</Border>
|
||||
|
||||
<TextBlock Text="{Binding Selected.Description}" TextWrapping="Wrap"/>
|
||||
<shvc:BaseValueSlider
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
BaseValueInfo="{Binding BaseValueInfo, Mode=OneWay}"/>
|
||||
|
||||
|
||||
<Border Padding="16" Style="{ThemeResource BorderCardStyle}">
|
||||
<StackPanel Spacing="16">
|
||||
<TextBlock
|
||||
Margin="0,0,0,0"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{shcm:ResourceString Name=ViewPageWiKiAvatarAscensionMaterialsHeader}"/>
|
||||
<ItemsControl ItemTemplate="{StaticResource CultivateItemTemplate}" ItemsSource="{Binding Selected.CultivationItemsView}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<cwc:UniformGrid
|
||||
ColumnSpacing="8"
|
||||
Columns="3"
|
||||
RowSpacing="8"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Padding="16" Style="{ThemeResource BorderCardStyle}">
|
||||
<StackPanel Spacing="16" Visibility="{Binding Selected.Affix, Converter={StaticResource EmptyObjectToVisibilityConverter}}">
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{Binding Selected.Affix.Name}"/>
|
||||
<Pivot
|
||||
Margin="-16,-16,0,0"
|
||||
HeaderTemplate="{StaticResource AffixPivotHeaderTemplate}"
|
||||
ItemTemplate="{StaticResource AffixPivotItemTemplate}"
|
||||
ItemsSource="{Binding Selected.Affix.Descriptions}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
|
||||
<Border Padding="16" Style="{ThemeResource BorderCardStyle}">
|
||||
<StackPanel Spacing="16">
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewPageWiKiAvatarTeamCombinationHeader}"/>
|
||||
<ItemsControl ItemTemplate="{StaticResource CollocationTemplate}" ItemsSource="{Binding Selected.Collocation.Avatars}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<cwc:UniformGrid
|
||||
ColumnSpacing="8"
|
||||
Columns="3"
|
||||
RowSpacing="8"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Grid Padding="16">
|
||||
<StackPanel VerticalAlignment="Center" Visibility="{Binding Weapons.Count, Converter={StaticResource Int32ToVisibilityRevertConverter}}">
|
||||
<shci:CachedImage
|
||||
Height="120"
|
||||
MinWidth="{ThemeResource SettingsCardContentControlMinWidth}"
|
||||
EnableLazyLoading="False"
|
||||
Source="{StaticResource UI_EmotionIcon89}"/>
|
||||
<TextBlock
|
||||
Margin="0,5,0,21"
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="{shcm:ResourceString Name=ControlAutoSuggestBoxNotFoundValue}"/>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
<ScrollViewer Visibility="{Binding Weapons.Count, Converter={StaticResource Int32ToVisibilityConverter}}">
|
||||
<StackPanel Spacing="16">
|
||||
<Border Style="{ThemeResource BorderCardStyle}">
|
||||
<Border.Background>
|
||||
<ImageBrush ImageSource="ms-appx:///Resource/Icon/UI_GachaShowPanel_Bg_Weapon.png"/>
|
||||
</Border.Background>
|
||||
<cwc:ConstrainedBox AspectRatio="2048:1024">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.ColumnSpan="2" Background="{ThemeResource DarkOnlyOverlayMaskColorBrush}"/>
|
||||
<ScrollViewer
|
||||
Grid.Column="0"
|
||||
Margin="16"
|
||||
VerticalScrollBarVisibility="Hidden">
|
||||
<StackPanel>
|
||||
<shvc:BottomTextControl MaxWidth="80" Text="{shcm:ResourceString Name=ViewPageWiKiWeaponBeforeAscensionTitle}">
|
||||
<shvc:ItemIcon Icon="{Binding Selected.Icon, Converter={StaticResource EquipIconConverter}}" Quality="{Binding Selected.RankLevel}"/>
|
||||
</shvc:BottomTextControl>
|
||||
|
||||
<shvc:BottomTextControl Margin="0,16,0,0" Text="{shcm:ResourceString Name=ViewPageWiKiWeaponAfterAscensionTitle}">
|
||||
<shvc:ItemIcon Icon="{Binding Selected.AwakenIcon, Converter={StaticResource EquipIconConverter}}" Quality="{Binding Selected.RankLevel}"/>
|
||||
</shvc:BottomTextControl>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
<Grid Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="176*"/>
|
||||
<ColumnDefinition Width="848*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<shci:CachedImage
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Stretch"
|
||||
Source="{Binding Selected.Icon, Converter={StaticResource GachaEquipIconConverter}}"/>
|
||||
</Grid>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="16"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Bottom"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="{Binding Selected.Name}"/>
|
||||
</Grid>
|
||||
</cwc:ConstrainedBox>
|
||||
</Border>
|
||||
|
||||
<TextBlock Text="{Binding Selected.Description}" TextWrapping="Wrap"/>
|
||||
<shvc:BaseValueSlider
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
BaseValueInfo="{Binding BaseValueInfo, Mode=OneWay}"/>
|
||||
|
||||
|
||||
<Border Padding="16" Style="{ThemeResource BorderCardStyle}">
|
||||
<StackPanel Spacing="16">
|
||||
<TextBlock
|
||||
Margin="0,0,0,0"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{shcm:ResourceString Name=ViewPageWiKiAvatarAscensionMaterialsHeader}"/>
|
||||
<ItemsControl ItemTemplate="{StaticResource CultivateItemTemplate}" ItemsSource="{Binding Selected.CultivationItemsView}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<cwc:UniformGrid
|
||||
ColumnSpacing="8"
|
||||
Columns="3"
|
||||
RowSpacing="8"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Padding="16" Style="{ThemeResource BorderCardStyle}">
|
||||
<StackPanel Spacing="16" Visibility="{Binding Selected.Affix, Converter={StaticResource EmptyObjectToVisibilityConverter}}">
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{Binding Selected.Affix.Name}"/>
|
||||
<Pivot
|
||||
Margin="-16,-16,0,0"
|
||||
HeaderTemplate="{StaticResource AffixPivotHeaderTemplate}"
|
||||
ItemTemplate="{StaticResource AffixPivotItemTemplate}"
|
||||
ItemsSource="{Binding Selected.Affix.Descriptions}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
|
||||
<Border Padding="16" Style="{ThemeResource BorderCardStyle}">
|
||||
<StackPanel Spacing="16">
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewPageWiKiAvatarTeamCombinationHeader}"/>
|
||||
<ItemsControl ItemTemplate="{StaticResource CollocationTemplate}" ItemsSource="{Binding Selected.Collocation.Avatars}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<cwc:UniformGrid
|
||||
ColumnSpacing="8"
|
||||
Columns="3"
|
||||
RowSpacing="8"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</SplitView.Content>
|
||||
</SplitView>
|
||||
</Border>
|
||||
@@ -346,19 +360,34 @@
|
||||
<cwc:Case Value="Grid">
|
||||
<Border Margin="16,0,16,16" cw:Effects.Shadow="{ThemeResource CompatCardShadow}">
|
||||
<Border Style="{ThemeResource AcrylicBorderCardStyle}">
|
||||
<GridView
|
||||
Padding="16,16,4,4"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Left"
|
||||
ItemContainerStyle="{StaticResource LargeGridViewItemStyle}"
|
||||
ItemTemplate="{StaticResource WeaponGridTemplate}"
|
||||
ItemsSource="{Binding Weapons}"
|
||||
SelectedItem="{Binding Selected, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<mxi:Interaction.Behaviors>
|
||||
<shcb:SelectedItemInViewBehavior/>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</GridView>
|
||||
<Grid Padding="16,16,4,4">
|
||||
<StackPanel VerticalAlignment="Center" Visibility="{Binding Weapons.Count, Converter={StaticResource Int32ToVisibilityRevertConverter}}">
|
||||
<shci:CachedImage
|
||||
Height="120"
|
||||
MinWidth="{ThemeResource SettingsCardContentControlMinWidth}"
|
||||
EnableLazyLoading="False"
|
||||
Source="{StaticResource UI_EmotionIcon89}"/>
|
||||
<TextBlock
|
||||
Margin="0,5,0,21"
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="{shcm:ResourceString Name=ControlAutoSuggestBoxNotFoundValue}"/>
|
||||
</StackPanel>
|
||||
<GridView
|
||||
Padding="16,16,4,4"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Left"
|
||||
ItemContainerStyle="{StaticResource LargeGridViewItemStyle}"
|
||||
ItemTemplate="{StaticResource WeaponGridTemplate}"
|
||||
ItemsSource="{Binding Weapons}"
|
||||
SelectedItem="{Binding Selected, Mode=TwoWay}"
|
||||
SelectionMode="Single"
|
||||
Visibility="{Binding Weapons.Count, Converter={StaticResource Int32ToVisibilityConverter}}">
|
||||
<mxi:Interaction.Behaviors>
|
||||
<shcb:SelectedItemInViewBehavior/>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</GridView>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Border>
|
||||
</cwc:Case>
|
||||
|
||||
@@ -381,26 +381,29 @@ internal sealed partial class AchievementViewModel : Abstraction.ViewModel, INav
|
||||
{
|
||||
SetProperty(ref selectedAchievementGoal, null);
|
||||
|
||||
if (!string.IsNullOrEmpty(search))
|
||||
if (string.IsNullOrEmpty(search))
|
||||
{
|
||||
if (uint.TryParse(search, out uint achievementId))
|
||||
{
|
||||
Achievements.Filter = view => view.Inner.Id == achievementId;
|
||||
return;
|
||||
}
|
||||
|
||||
if (VersionRegex().IsMatch(search))
|
||||
{
|
||||
Achievements.Filter = view => view.Inner.Version == search;
|
||||
return;
|
||||
}
|
||||
|
||||
Achievements.Filter = view =>
|
||||
{
|
||||
return view.Inner.Title.Contains(search, StringComparison.CurrentCultureIgnoreCase)
|
||||
|| view.Inner.Description.Contains(search, StringComparison.CurrentCultureIgnoreCase);
|
||||
};
|
||||
Achievements.Filter = default!;
|
||||
return;
|
||||
}
|
||||
|
||||
if (uint.TryParse(search, out uint achievementId))
|
||||
{
|
||||
Achievements.Filter = view => view.Inner.Id == achievementId;
|
||||
return;
|
||||
}
|
||||
|
||||
if (VersionRegex().IsMatch(search))
|
||||
{
|
||||
Achievements.Filter = view => view.Inner.Version == search;
|
||||
return;
|
||||
}
|
||||
|
||||
Achievements.Filter = view =>
|
||||
{
|
||||
return view.Inner.Title.Contains(search, StringComparison.CurrentCultureIgnoreCase)
|
||||
|| view.Inner.Description.Contains(search, StringComparison.CurrentCultureIgnoreCase);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -119,12 +119,12 @@ internal sealed partial class WikiAvatarViewModel : Abstraction.ViewModel
|
||||
|
||||
availableTokens = FrozenDictionary.ToFrozenDictionary(
|
||||
[
|
||||
.. avatars.Select(avatar => KeyValuePair.Create(avatar.Name, new SearchToken(SearchTokenKind.Avatar, avatar.Name, sideIconUri: AvatarSideIconConverter.IconNameToUri(avatar.SideIcon)))),
|
||||
.. IntrinsicFrozen.AssociationTypes.Select(assoc => KeyValuePair.Create(assoc, new SearchToken(SearchTokenKind.AssociationType, assoc, iconUri: AssociationTypeIconConverter.AssociationTypeNameToIconUri(assoc)))),
|
||||
.. IntrinsicFrozen.BodyTypes.Select(b => KeyValuePair.Create(b, new SearchToken(SearchTokenKind.BodyType, b))),
|
||||
.. IntrinsicFrozen.ElementNames.Select(e => KeyValuePair.Create(e, new SearchToken(SearchTokenKind.ElementName, e, iconUri: ElementNameIconConverter.ElementNameToIconUri(e)))),
|
||||
.. IntrinsicFrozen.ItemQualities.Select(i => KeyValuePair.Create(i, new SearchToken(SearchTokenKind.ItemQuality, i, quality: QualityColorConverter.QualityNameToColor(i)))),
|
||||
.. IntrinsicFrozen.WeaponTypes.Select(w => KeyValuePair.Create(w, new SearchToken(SearchTokenKind.WeaponType, w, iconUri: WeaponTypeIconConverter.WeaponTypeNameToIconUri(w)))),
|
||||
.. avatars.Select((avatar, index) => KeyValuePair.Create(avatar.Name, new SearchToken(SearchTokenKind.Avatar, avatar.Name, index, sideIconUri: AvatarSideIconConverter.IconNameToUri(avatar.SideIcon)))),
|
||||
.. IntrinsicFrozen.AssociationTypeNameValues.Select(nv => KeyValuePair.Create(nv.Name, new SearchToken(SearchTokenKind.AssociationType, nv.Name, (int)nv.Value, iconUri: AssociationTypeIconConverter.AssociationTypeToIconUri(nv.Value)))),
|
||||
.. IntrinsicFrozen.BodyTypeNameValues.Select(nv => KeyValuePair.Create(nv.Name, new SearchToken(SearchTokenKind.BodyType, nv.Name, (int)nv.Value))),
|
||||
.. IntrinsicFrozen.ElementNameValues.Select(nv => KeyValuePair.Create(nv.Name, new SearchToken(SearchTokenKind.ElementName, nv.Name, nv.Value, iconUri: ElementNameIconConverter.ElementNameToIconUri(nv.Name)))),
|
||||
.. IntrinsicFrozen.ItemQualityNameValues.Select(nv => KeyValuePair.Create(nv.Name, new SearchToken(SearchTokenKind.ItemQuality, nv.Name, (int)nv.Value, quality: QualityColorConverter.QualityToColor(nv.Value)))),
|
||||
.. IntrinsicFrozen.WeaponTypeNameValues.Select(nv => KeyValuePair.Create(nv.Name, new SearchToken(SearchTokenKind.WeaponType, nv.Name, (int)nv.Value, iconUri: WeaponTypeIconConverter.WeaponTypeToIconUri(nv.Value)))),
|
||||
]);
|
||||
|
||||
return true;
|
||||
@@ -246,10 +246,11 @@ internal sealed partial class WikiAvatarViewModel : Abstraction.ViewModel
|
||||
if (FilterTokens.IsNullOrEmpty())
|
||||
{
|
||||
Avatars.Filter = default!;
|
||||
return;
|
||||
}
|
||||
|
||||
Avatars.Filter = AvatarFilter.Compile(FilterTokens);
|
||||
else
|
||||
{
|
||||
Avatars.Filter = AvatarFilter.Compile(FilterTokens);
|
||||
}
|
||||
|
||||
if (Selected is not null && Avatars.Contains(Selected))
|
||||
{
|
||||
|
||||
@@ -119,10 +119,10 @@ internal sealed partial class WikiWeaponViewModel : Abstraction.ViewModel
|
||||
|
||||
availableTokens = FrozenDictionary.ToFrozenDictionary(
|
||||
[
|
||||
.. weapons.Select(w => KeyValuePair.Create(w.Name, new SearchToken(SearchTokenKind.Weapon, w.Name, sideIconUri: EquipIconConverter.IconNameToUri(w.Icon)))),
|
||||
.. IntrinsicFrozen.FightProperties.Select(f => KeyValuePair.Create(f, new SearchToken(SearchTokenKind.FightProperty, f))),
|
||||
.. IntrinsicFrozen.ItemQualities.Select(i => KeyValuePair.Create(i, new SearchToken(SearchTokenKind.ItemQuality, i, quality: QualityColorConverter.QualityNameToColor(i)))),
|
||||
.. IntrinsicFrozen.WeaponTypes.Select(w => KeyValuePair.Create(w, new SearchToken(SearchTokenKind.WeaponType, w, iconUri: WeaponTypeIconConverter.WeaponTypeNameToIconUri(w)))),
|
||||
.. weapons.Select((weapon, index) => KeyValuePair.Create(weapon.Name, new SearchToken(SearchTokenKind.Weapon, weapon.Name, index, sideIconUri: EquipIconConverter.IconNameToUri(weapon.Icon)))),
|
||||
.. IntrinsicFrozen.FightPropertyNameValues.Select(nv => KeyValuePair.Create(nv.Name, new SearchToken(SearchTokenKind.FightProperty, nv.Name, (int)nv.Value))),
|
||||
.. IntrinsicFrozen.ItemQualityNameValues.Select(nv => KeyValuePair.Create(nv.Name, new SearchToken(SearchTokenKind.ItemQuality, nv.Name, (int)nv.Value, quality: QualityColorConverter.QualityToColor(nv.Value)))),
|
||||
.. IntrinsicFrozen.WeaponTypeNameValues.Select(nv => KeyValuePair.Create(nv.Name, new SearchToken(SearchTokenKind.WeaponType, nv.Name, (int)nv.Value, iconUri: WeaponTypeIconConverter.WeaponTypeToIconUri(nv.Value)))),
|
||||
]);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
@@ -228,10 +228,11 @@ internal sealed partial class WikiWeaponViewModel : Abstraction.ViewModel
|
||||
if (FilterTokens.IsNullOrEmpty())
|
||||
{
|
||||
Weapons.Filter = default!;
|
||||
return;
|
||||
}
|
||||
|
||||
Weapons.Filter = WeaponFilter.Compile(FilterTokens);
|
||||
else
|
||||
{
|
||||
Weapons.Filter = WeaponFilter.Compile(FilterTokens);
|
||||
}
|
||||
|
||||
if (Selected is not null && Weapons.Contains(Selected))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user