|
3 | 3 | x:Class="Microsoft.CmdPal.UI.Controls.CommandBar"
|
4 | 4 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
5 | 5 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
| 6 | + xmlns:animations="using:CommunityToolkit.WinUI.Animations" |
6 | 7 | xmlns:cmdpalUI="using:Microsoft.CmdPal.UI"
|
7 | 8 | xmlns:converters="using:CommunityToolkit.WinUI.Converters"
|
8 | 9 | xmlns:cpcontrols="using:Microsoft.CmdPal.UI.Controls"
|
|
62 | 63 | Text="{x:Bind RequestedShortcut, Mode=OneWay, Converter={StaticResource KeyChordToStringConverter}}" />
|
63 | 64 | </Grid>
|
64 | 65 | </DataTemplate>
|
| 66 | + |
| 67 | + <animations:ImplicitAnimationSet x:Name="ShowAnimations"> |
| 68 | + <animations:OpacityAnimation |
| 69 | + From="0" |
| 70 | + To="1.0" |
| 71 | + Duration="0:0:0.340" /> |
| 72 | + <animations:ScaleAnimation |
| 73 | + From="0.85" |
| 74 | + To="1" |
| 75 | + Duration="0:0:0.350" /> |
| 76 | + </animations:ImplicitAnimationSet> |
| 77 | + <animations:ImplicitAnimationSet x:Name="HideAnimations"> |
| 78 | + <animations:OpacityAnimation |
| 79 | + From="1.0" |
| 80 | + To="0" |
| 81 | + Duration="0:0:0.240" /> |
| 82 | + <animations:ScaleAnimation |
| 83 | + From="1" |
| 84 | + To="0.85" |
| 85 | + Duration="0:0:0.350" /> |
| 86 | + </animations:ImplicitAnimationSet> |
65 | 87 | </ResourceDictionary>
|
66 | 88 | </UserControl.Resources>
|
67 | 89 |
|
|
80 | 102 | Margin="8,0,0,0"
|
81 | 103 | Tapped="PageIcon_Tapped"
|
82 | 104 | Visibility="{x:Bind CurrentPageViewModel.IsNested, Mode=OneWay}">
|
83 |
| - |
84 |
| - <cpcontrols:IconBox |
85 |
| - x:Name="IconBorder" |
86 |
| - Width="16" |
87 |
| - Height="16" |
88 |
| - x:Load="{x:Bind IsLoaded, Mode=OneWay}" |
89 |
| - CornerRadius="{StaticResource ControlCornerRadius}" |
90 |
| - SourceKey="{x:Bind CurrentPageViewModel.Icon, Mode=OneWay}" |
91 |
| - SourceRequested="{x:Bind help:IconCacheProvider.SourceRequested}" /> |
92 | 105 | <InfoBadge Visibility="{x:Bind CurrentPageViewModel.HasStatusMessage, Mode=OneWay}" Value="{x:Bind CurrentPageViewModel.StatusMessages.Count, Mode=OneWay}" />
|
93 | 106 | <Grid.ContextFlyout>
|
94 | 107 | <Flyout x:Name="StatusMessagesFlyout" Placement="TopEdgeAlignedLeft">
|
|
121 | 134 | </Grid>
|
122 | 135 | <Button
|
123 | 136 | x:Name="SettingsIconButton"
|
124 |
| - Margin="0,0,0,0" |
| 137 | + x:Uid="SettingsButton" |
| 138 | + animations:Implicit.HideAnimations="{StaticResource HideAnimations}" |
| 139 | + animations:Implicit.ShowAnimations="{StaticResource ShowAnimations}" |
| 140 | + ui:VisualExtensions.NormalizedCenterPoint="0.5,0.5" |
125 | 141 | Style="{StaticResource SubtleButtonStyle}"
|
126 | 142 | Tapped="SettingsIcon_Tapped"
|
127 | 143 | Visibility="{x:Bind CurrentPageViewModel.IsNested, Mode=OneWay, Converter={StaticResource BoolToInvertedVisibilityConverter}}">
|
128 |
| - |
129 | 144 | <StackPanel Orientation="Horizontal" Spacing="8">
|
130 | 145 | <FontIcon
|
131 |
| - HorizontalAlignment="Left" |
132 | 146 | VerticalAlignment="Center"
|
133 | 147 | FontSize="16"
|
134 | 148 | Glyph="" />
|
|
138 | 152 | Text="Settings" />
|
139 | 153 | </StackPanel>
|
140 | 154 | </Button>
|
141 |
| - |
142 | 155 | <TextBlock
|
143 | 156 | Grid.Column="1"
|
144 | 157 | VerticalAlignment="Center"
|
145 |
| - FontSize="12" |
| 158 | + Style="{StaticResource CaptionTextBlockStyle}" |
146 | 159 | Text="{x:Bind CurrentPageViewModel.Title, Mode=OneWay}"
|
147 | 160 | Visibility="{x:Bind CurrentPageViewModel.IsNested, Mode=OneWay}" />
|
148 |
| - |
149 | 161 | <StackPanel
|
150 | 162 | Grid.Column="2"
|
| 163 | + Padding="0,0,4,0" |
151 | 164 | HorizontalAlignment="Right"
|
152 | 165 | Orientation="Horizontal"
|
153 | 166 | Spacing="4">
|
154 | 167 | <Button
|
155 | 168 | x:Name="PrimaryButton"
|
156 | 169 | Padding="6,4,4,4"
|
| 170 | + animations:Implicit.HideAnimations="{StaticResource HideAnimations}" |
| 171 | + animations:Implicit.ShowAnimations="{StaticResource ShowAnimations}" |
| 172 | + ui:VisualExtensions.NormalizedCenterPoint="0.5,0.5" |
157 | 173 | x:Load="{x:Bind IsLoaded, Mode=OneWay}"
|
158 | 174 | Background="Transparent"
|
159 | 175 | Style="{StaticResource SubtleButtonStyle}"
|
160 | 176 | Tapped="PrimaryButton_Tapped"
|
161 | 177 | Visibility="{x:Bind ViewModel.HasPrimaryCommand, Mode=OneWay}">
|
162 |
| - |
163 | 178 | <StackPanel Orientation="Horizontal" Spacing="8">
|
164 | 179 | <TextBlock
|
165 | 180 | VerticalAlignment="Center"
|
|
183 | 198 | <Button
|
184 | 199 | x:Name="SecondaryButton"
|
185 | 200 | Padding="6,4,4,4"
|
| 201 | + animations:Implicit.HideAnimations="{StaticResource HideAnimations}" |
| 202 | + animations:Implicit.ShowAnimations="{StaticResource ShowAnimations}" |
| 203 | + ui:VisualExtensions.NormalizedCenterPoint="0.5,0.5" |
186 | 204 | x:Load="{x:Bind IsLoaded, Mode=OneWay}"
|
187 | 205 | Style="{StaticResource SubtleButtonStyle}"
|
188 | 206 | Tapped="SecondaryButton_Tapped"
|
189 | 207 | Visibility="{x:Bind ViewModel.HasSecondaryCommand, Mode=OneWay}">
|
190 |
| - |
191 | 208 | <StackPanel Orientation="Horizontal" Spacing="8">
|
192 | 209 | <TextBlock
|
193 | 210 | VerticalAlignment="Center"
|
|
226 | 243 | </Button>
|
227 | 244 | <Button
|
228 | 245 | x:Name="MoreCommandsButton"
|
| 246 | + x:Uid="MoreCommandsButton" |
229 | 247 | Padding="4"
|
| 248 | + animations:Implicit.HideAnimations="{StaticResource HideAnimations}" |
| 249 | + animations:Implicit.ShowAnimations="{StaticResource ShowAnimations}" |
| 250 | + ui:VisualExtensions.NormalizedCenterPoint="0.5,0.5" |
230 | 251 | Content="{ui:FontIcon Glyph=,
|
231 | 252 | FontSize=16}"
|
232 | 253 | Style="{StaticResource SubtleButtonStyle}"
|
|
0 commit comments