Skip to content

Commit 87ece15

Browse files
committed
fix popup not displaying in correct place if a control expands
1 parent 73cb5ba commit 87ece15

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

MainDemo.Wpf/Trees.xaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,11 @@
112112
</TreeView>
113113
<materialDesign:PopupBox Grid.Row="1"
114114
Style="{StaticResource MaterialDesignMultiFloatingActionPopupBox}"
115-
PlacementMode="LeftAndAlignTopEdges"
116-
ToolTipService.Placement="Bottom"
115+
PlacementMode="LeftAndAlignMiddles"
117116
ToolTip="Manage items"
118117
Margin="0 0 10 10"
119118
HorizontalAlignment="Right" VerticalAlignment="Bottom">
120-
<StackPanel>
119+
<StackPanel Orientation="Horizontal">
121120
<Button ToolTip="Add an item"
122121
Command="{Binding AddCommand}">
123122
<Path Data="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"

MaterialDesignThemes.Wpf/PopupBox.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ private static void IsPopupOpenPropertyChangedCallback(DependencyObject dependen
242242
}
243243

244244
if (newValue)
245-
popupBox.AnimateChildren();
245+
popupBox.AnimateChildren();
246+
247+
popupBox._popup?.RefreshPosition();
246248

247249
VisualStateManager.GoToState(popupBox, newValue ? PopupIsOpenStateName : PopupIsClosedStateName, true);
248250
}

0 commit comments

Comments
 (0)