Handle Pop-Up Opening and Closing Event in ApplicationMenu
27 May 20211 minute to read
To perform the action based on opening and closing of the ApplicationMenu, make use of IsPopupOpenChanged
event.
<syncfusion:ApplicationMenu Name="_applicationMenu" Width="38" Height="38" ApplicationButtonImage="Resources/App.ico" IsPopupOpenChanged="_applicationMenu_IsPopupOpenChanged">
private void _applicationMenu_IsPopupOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if((d as ApplicationMenu).IsPopupOpen)
{
newMenuButton.IsEnabled = false;
}
else
{
newMenuButton.IsEnabled = true;
}
}
Private Sub _applicationMenu_IsPopupOpenChanged(ByVal d As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
If(TryCast(d, ApplicationMenu)).IsPopupOpen Then
newMenuButton.IsEnabled = False
Else
newMenuButton.IsEnabled = True
End If
End Sub