Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ContextMenu
- {
- private bool LockDeactivated;
- public async Task ShowDialogAsync(CornerRadius Corners)
- {
- Show();
- while (!LockDeactivated){ await Task.Delay(100); }
- }
- private void StackPanel_MouseUp(object sender, MouseButtonEventArgs e)
- {
- LockDeactivated = true;
- Close();
- }
- private void Window_Deactivated(object sender, EventArgs e)
- {
- if (!LockDeactivated) { Close(); }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement