|
117 | 117 | <Setter Property="HorizontalContentAlignment" Value="Left" /> |
118 | 118 | <Setter Property="VerticalAlignment" Value="Stretch" /> |
119 | 119 |
|
120 | | - <Setter Property="IsTabStop" Value="True" /> |
121 | | - <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" /> |
122 | | - |
123 | 120 | <Setter Property="Template"> |
124 | 121 | <Setter.Value> |
125 | 122 | <ControlTemplate TargetType="local:OmnibarMode"> |
126 | 123 | <Grid |
127 | 124 | x:Name="PART_RootGrid" |
128 | 125 | Height="{TemplateBinding Height}" |
129 | 126 | HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
130 | | - Background="{TemplateBinding Background}" |
131 | | - TabFocusNavigation="Local"> |
| 127 | + Background="{TemplateBinding Background}"> |
132 | 128 | <!-- Mode Button --> |
133 | | - <Border |
| 129 | + <Button |
134 | 130 | x:Name="PART_ModeButton" |
135 | 131 | Width="{StaticResource OmnibarModeDefaultClickAreaWidth}" |
136 | 132 | Margin="1" |
137 | 133 | Background="{TemplateBinding Background}" |
138 | 134 | BorderBrush="{TemplateBinding BorderBrush}" |
139 | | - BorderThickness="{TemplateBinding BorderThickness}" |
| 135 | + BorderThickness="0" |
140 | 136 | CornerRadius="{TemplateBinding CornerRadius}" |
141 | | - IsTabStop="True" |
142 | | - ToolTipService.ToolTip="{Binding ModeName, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" |
143 | | - UseSystemFocusVisuals="{StaticResource UseSystemFocusVisuals}"> |
144 | | - <Border.BackgroundTransition> |
145 | | - <BrushTransition Duration="0:0:0.083" /> |
146 | | - </Border.BackgroundTransition> |
| 137 | + ToolTipService.ToolTip="{Binding ModeName, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"> |
| 138 | + <Button.Resources> |
| 139 | + <SolidColorBrush x:Key="ButtonBackgroundPointerOver" Color="{ThemeResource SubtleFillColorSecondary}" /> |
| 140 | + <SolidColorBrush x:Key="ButtonBackgroundPressed" Color="{ThemeResource SubtleFillColorTertiary}" /> |
| 141 | + </Button.Resources> |
147 | 142 |
|
148 | 143 | <Grid> |
149 | 144 | <ContentPresenter |
|
160 | 155 | Content="{Binding IconOnActive, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" |
161 | 156 | Visibility="Collapsed" /> |
162 | 157 | </Grid> |
163 | | - </Border> |
| 158 | + </Button> |
164 | 159 |
|
165 | 160 | <ContentPresenter |
166 | 161 | x:Name="PART_InactiveContent" |
|
174 | 169 |
|
175 | 170 | <VisualStateGroup x:Name="PointerStates"> |
176 | 171 | <VisualState x:Name="PointerNormal" /> |
177 | | - <VisualState x:Name="PointerOver"> |
178 | | - <VisualState.Setters> |
179 | | - <Setter Target="PART_ModeButton.Background" Value="{ThemeResource SubtleFillColorSecondaryBrush}" /> |
180 | | - </VisualState.Setters> |
181 | | - </VisualState> |
| 172 | + <VisualState x:Name="PointerOver" /> |
182 | 173 | <VisualState x:Name="PointerPressed"> |
183 | 174 | <VisualState.Setters> |
184 | | - <Setter Target="PART_ModeButton.Background" Value="{ThemeResource SubtleFillColorTertiaryBrush}" /> |
185 | 175 | <Setter Target="PART_ModeButtonInactiveIconPresenter.Visibility" Value="Collapsed" /> |
186 | 176 | <Setter Target="PART_ModeButtonActiveIconPresenter.Visibility" Value="Visible" /> |
187 | 177 | </VisualState.Setters> |
|
0 commit comments