How to place close [x] in WPF popup
问题 I have succeed creating a popup using this code in c# and wpf <Popup Name="myPopup" IsOpen="True"> <Label Name="myLabel" Content="This is a popup!" Background="AliceBlue" Foreground="Blue"/> </Popup> I use the code below to hide it when one mouse-click outside it and it works right. myPopup.IsOpen = true; myPopup.Placement = System.Windows.Controls.Primitives.PlacementMode.Mouse; myPopup.StaysOpen = false; myPopup.Height = 500; myPopup.Width = 500; myPopup.IsOpen = true; My problem is that I