Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CommandBarFlyout closing animation to include button moving #3594

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dev/CommandBarFlyout/CommandBarFlyout.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,8 @@
<Grid x:Name="OuterContentRoot"
VerticalAlignment="Top"
Margin="{TemplateBinding Padding}"
Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=FlyoutTemplateSettings.CurrentWidth}"
MinWidth="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=FlyoutTemplateSettings.CurrentWidth}"
marcelwgn marked this conversation as resolved.
Show resolved Hide resolved
Height="{TemplateBinding Height}"
Background="{TemplateBinding Background}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t [](start = 47, length = 1)

Why did the background have to get moved? can it be moved to the ContentRoot grid instead of both its children?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh forgot to reply, the reason why we moved the background is that the "outer" container is not lined up with the animation of the button. The width lags behind resulting in the background being visible even if the button already animated to the correct position. Updated it to use the contentroot grid instead.

contract4Present:XYFocusKeyboardNavigation="Enabled">
<Grid.Clip>
<RectangleGeometry x:Name="OuterContentRootClip" Rect="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=FlyoutTemplateSettings.ContentClipRect}">
Expand All @@ -352,6 +351,7 @@
<Grid x:Name="PrimaryItemsRoot"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
contract7Present:CornerRadius="{TemplateBinding CornerRadius}"
contract7NotPresent:CornerRadius="{ThemeResource OverlayCornerRadius}">
<Grid.ColumnDefinitions>
Expand Down Expand Up @@ -391,6 +391,7 @@
<Popup x:Name="OverflowPopup">
<Grid
x:Name="OuterOverflowContentRoot"
Background="{TemplateBinding Background}"
Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=FlyoutTemplateSettings.ExpandedWidth}">
<Grid.Clip>
<RectangleGeometry x:Name="OuterOverflowContentRootClip" Rect="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=FlyoutTemplateSettings.OverflowContentClipRect}">
Expand Down