mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-05-25 10:05:49 +08:00
为 MapLabelSearchWindow、ArtifactOcrDialog、PromptDialog 等十三个 WPF 窗口添加了 AutoTranslateInterceptor 行为,以启用自动翻译功能。这确保了应用程序界面的文本内容在需要时可以被正确拦截并处理,提升国际化支持。
43 lines
2.0 KiB
XML
43 lines
2.0 KiB
XML
<ui:FluentWindow x:Class="BetterGenshinImpact.View.Windows.MapLabelSearchWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
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:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
|
xmlns:behavior="clr-namespace:BetterGenshinImpact.View.Behavior"
|
|
Width="280"
|
|
Height="64"
|
|
MinWidth="120"
|
|
MinHeight="64"
|
|
FontFamily="{DynamicResource TextThemeFontFamily}"
|
|
WindowStartupLocation="Manual"
|
|
Topmost="True"
|
|
WindowStyle="None"
|
|
Background="Transparent"
|
|
behavior:AutoTranslateInterceptor.EnableAutoTranslate="True"
|
|
mc:Ignorable="d">
|
|
<Grid Margin="0">
|
|
<Border Margin="0"
|
|
CornerRadius="8"
|
|
Background="{ui:ThemeResource ApplicationBackgroundBrush}">
|
|
<Grid Margin="8,4,8,4">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ui:TextBox x:Name="SearchTextBox"
|
|
Grid.Column="0"
|
|
Height="32"
|
|
PlaceholderText="搜索当前区域下的标点分类"
|
|
Text="{Binding MapLabelSearchText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
<ui:Button Grid.Column="1"
|
|
Width="34"
|
|
Height="28"
|
|
Margin="8,2,0,2"
|
|
Content="X"
|
|
Click="CloseButton_Click" />
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</ui:FluentWindow>
|