Skip to content

Commit 8ae9fb7

Browse files
author
Eric Rodewald
committed
Add simple PopupOpened/Closed event example to demo project
Found in "Buttons & Toggles", "PopupBox, Style MaterialDesignMultiFloatingActionPopupBox"
1 parent 927ce7f commit 8ae9fb7

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

MainDemo.Wpf/Buttons.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@
8080
<materialDesign:PopupBox Style="{StaticResource MaterialDesignMultiFloatingActionPopupBox}"
8181
PlacementMode="BottomAndAlignCentres"
8282
ToolTipService.Placement="Right"
83-
ToolTip="PopupBox, Style MaterialDesignMultiFloatingActionPopupBox">
83+
ToolTip="PopupBox, Style MaterialDesignMultiFloatingActionPopupBox"
84+
PopupOpened="PopupBox_OnPopupOpened"
85+
PopupClosed="PopupBox_OnPopupClosed">
8486
<StackPanel>
8587
<Button ToolTip="One">1</Button>
8688
<Button ToolTip="Two">2</Button>

MainDemo.Wpf/Buttons.xaml.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,15 @@ private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
3939
{
4040
Console.WriteLine("Just checking we haven't suppressed the button.");
4141
}
42+
43+
private void PopupBox_OnPopupOpened(object sender, RoutedEventArgs e)
44+
{
45+
Console.WriteLine("Just making sure the popup has opened.");
46+
}
47+
48+
private void PopupBox_OnPopupClosed(object sender, RoutedEventArgs e)
49+
{
50+
Console.WriteLine("Just making sure the popup has closed.");
51+
}
4252
}
4353
}

0 commit comments

Comments
 (0)