-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTranslateResult.xaml
53 lines (51 loc) · 2.85 KB
/
TranslateResult.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<mah:MetroWindow x:Class="CopyPlusPlus.TranslateResult"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:copyPlusPlus="clr-namespace:CopyPlusPlus"
xmlns:wpf="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
TitleCharacterCasing="Normal"
mc:Ignorable="d" SizeToContent="WidthAndHeight" ResizeMode="CanResizeWithGrip"
ShowInTaskbar="False" WindowStartupLocation="CenterScreen" Topmost="True" WindowStyle="SingleBorderWindow"
MaxWidth="700" MaxHeight="1000" Height="100" Width="200" MinWidth="250" MinHeight="100"
WindowTransitionsEnabled="False"
NonActiveWindowTitleBrush="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"
WindowTitleBrush="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Title="Esc 关闭" ShowMinButton="False">
<mah:MetroWindow.TitleTemplate>
<DataTemplate>
<TextBlock Text="{TemplateBinding Content}"
TextTrimming="CharacterEllipsis"
VerticalAlignment="Center"
Margin="2 -1 15 0"
FontFamily="Microsoft YaHei UI"
FontSize="13" />
</DataTemplate>
</mah:MetroWindow.TitleTemplate>
<mah:MetroWindow.IconTemplate>
<DataTemplate>
<Grid Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Margin="4"
Background="Transparent"
RenderOptions.EdgeMode="Aliased"
RenderOptions.BitmapScalingMode="HighQuality">
<Image Source="copy.ico" />
</Grid>
</DataTemplate>
</mah:MetroWindow.IconTemplate>
<mah:MetroWindow.RightWindowCommands>
<mah:WindowCommands>
<Button x:Name="Pin" Click="PinSwitch" Background="#FFFFFEFF">
<wpf:TextBlock Text="📌" />
</Button>
</mah:WindowCommands>
</mah:MetroWindow.RightWindowCommands>
<TextBox x:Name="TextBox" Text="TextBox" TextWrapping="Wrap" Margin="3,1,3,3" Padding="3,3,3,3"
IsUndoEnabled="True" AllowDrop="False" AcceptsReturn="True" AcceptsTab="True" AutoWordSelection="True"
FontSize="16" FontFamily="Microsoft YaHei UI" />
<Window.CommandBindings>
<CommandBinding Command="{x:Static copyPlusPlus:TranslateResult.EscEvent}" Executed="EscExecuted" />
</Window.CommandBindings>
</mah:MetroWindow>