如何在我的8.1通用应用程序中处理“堆叠”弹出窗口?

时间:2014-10-23 00:07:34

标签: c# win-universal-app flyout

Flyout flyout = new Flyout();

Button button = new Button();
button.Content = "open";
button.Flyout = flyout;

StackPanel stack = new StackPanel();

ComboBox comboBox = new ComboBox();

int[] arr = {0,1,2,3,4,5,6,7,8,9};
comboBox.ItemsSource = arr;

stack.Children.Add(comboBox);

Button closeButton = new Button();
closeButton.Content = "close";
closeButton.Click += delegate(object sender, RoutedEventArgs e)
{
                            //saving stuff
    flyout.Hide();
};
stack.Children.Add(closeButton);

flyout.Content = stack;

当我打开组合框时,它会访问自己的弹出框以让用户选择一个数字。这样做关闭了我所做的弹出。在用户按下closeButton之前,如何阻止我的弹出窗口关闭?

0 个答案:

没有答案