|
7 | 7 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
8 | 8 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
9 | 9 | mc:Ignorable="d"> |
10 | | - <Button ToolTipService.ToolTip="设置及其他 (Alt+F)" Style="{StaticResource AlternateCloseButtonStyle}"> |
11 | | - <Button.KeyboardAccelerators> |
12 | | - <KeyboardAccelerator Key="F" Modifiers="Menu"/> |
13 | | - </Button.KeyboardAccelerators> |
14 | | - <FontIcon Glyph="" /> |
15 | | - <Button.Flyout> |
| 10 | + <local:IconButton |
| 11 | + TipText="设置及其他 (Alt+F)" |
| 12 | + IconGlyph="" |
| 13 | + Key="F" Modifiers="Menu"> |
| 14 | + <local:IconButton.Flyout> |
16 | 15 | <MenuFlyout Opening="MenuFlyout_Opening" Placement="BottomEdgeAlignedRight"> |
17 | 16 | <MenuFlyoutItem Text="新建标签页" Click="TryCreateNewTab"> |
18 | 17 | <MenuFlyoutItem.KeyboardAccelerators> |
|
36 | 35 |
|
37 | 36 | <MenuFlyoutSeparator /> |
38 | 37 |
|
| 38 | + <MenuFlyoutItem> |
| 39 | + <MenuFlyoutItem.Template> |
| 40 | + <ControlTemplate> |
| 41 | + <Grid> |
| 42 | + <Grid.ColumnDefinitions> |
| 43 | + <ColumnDefinition Width="*"/> |
| 44 | + <ColumnDefinition Width="Auto"/> |
| 45 | + </Grid.ColumnDefinitions> |
| 46 | + |
| 47 | + <TextBlock Text="缩放" Margin="48,0,0,0" VerticalAlignment="Center"/> |
| 48 | + |
| 49 | + <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right"> |
| 50 | + <local:IconButton |
| 51 | + TipText="缩小 (Ctrl+减号键)" |
| 52 | + IconGlyph="" |
| 53 | + Key="Subtract" Modifiers="Control" /> |
| 54 | + |
| 55 | + <TextBlock x:Name="zoomBlock" Text="100%" VerticalAlignment="Center"/> |
| 56 | + |
| 57 | + <local:IconButton |
| 58 | + TipText="放大 (Ctrl+加号键)" |
| 59 | + IconGlyph="" |
| 60 | + Key="Add" Modifiers="Control" /> |
| 61 | + |
| 62 | + <Border Grid.Column="4" Background="LightGray" Width="1" Margin="0,5,0,5"/> |
| 63 | + |
| 64 | + <local:IconButton |
| 65 | + TipText="进入全屏" |
| 66 | + IconGlyph="" |
| 67 | + Key="F11" Modifiers="None" /> |
| 68 | + </StackPanel> |
| 69 | + </Grid> |
| 70 | + </ControlTemplate> |
| 71 | + </MenuFlyoutItem.Template> |
| 72 | + </MenuFlyoutItem> |
| 73 | + |
| 74 | + <MenuFlyoutSeparator /> |
| 75 | + |
39 | 76 | <MenuFlyoutItem Text="收藏夹" Click="ShowFlyout"> |
40 | 77 | <MenuFlyoutItem.KeyboardAccelerators> |
41 | 78 | <KeyboardAccelerator Key="O" Modifiers="Control,Shift"/> |
|
72 | 109 | <MenuFlyoutItem.KeyboardAccelerators> |
73 | 110 | <KeyboardAccelerator Key="P" Modifiers="Control"/> |
74 | 111 | </MenuFlyoutItem.KeyboardAccelerators> |
75 | | - |
| 112 | + |
76 | 113 | <MenuFlyoutItem.Icon> |
77 | 114 | <FontIcon Glyph=""/> |
78 | 115 | </MenuFlyoutItem.Icon> |
|
104 | 141 |
|
105 | 142 | <MenuFlyoutItem Text="关闭此软件" Click="CloseApp"/> |
106 | 143 | </MenuFlyout> |
107 | | - </Button.Flyout> |
108 | | - </Button> |
| 144 | + </local:IconButton.Flyout> |
| 145 | + </local:IconButton> |
109 | 146 |
|
110 | 147 | </Page> |
0 commit comments