WPF popup window

前端 未结 4 851
时光取名叫无心
时光取名叫无心 2021-01-01 10:19

I would like to let the user choose their options after a button is clicked. For example, showing two buttons, \"Restart Now\" and \"Restart Later\" in a modal popup window

4条回答
  •  囚心锁ツ
    2021-01-01 10:52

    XAML

    
          
            Popup Text
          
    
    

    c#

        Popup codePopup = new Popup();
        TextBlock popupText = new TextBlock();
        popupText.Text = "Popup Text";
        popupText.Background = Brushes.LightBlue;
        popupText.Foreground = Brushes.Blue;
        codePopup.Child = popupText;
    

    you can find more details about the Popup Control from MSDN documentation.

    MSDN documentation on Popup control

提交回复
热议问题