I created a WPF Popup Control on my WPF Form. When I click, the Popup Opens and it also moves properly. but when I Clicked on textbox in popup window then popup moves slightly towards the edge of main window. I don't want to move popup when I clicked on textbox in Popup?
Here is my code:
- private void MyAddJobPopup_MouseMove(object sender,System.Windows.Input.MouseEventArgs e)
- {
- if (!MyAddJobPopup.IsOpen)
- MyAddJobPopup.IsOpen = true;
- if (e.LeftButton == MouseButtonState.Pressed)
- { var mousePosition = e.GetPosition(this.HardwareElectricalTbl);
- this.MyAddJobPopup.HorizontalOffset = mousePosition.X;
- this.MyAddJobPopup.VerticalOffset = mousePosition.Y;
- }
- }

Amit GuptaRank #190 · 12.8K reputationPosted Sep 23, 2019, 5:46 AM EDT
Piyush PansuriyaRank #454 · 5.5K reputationPosted Sep 23, 2019, 4:07 AM EDT
Anuja Godse25 reputationPosted Sep 26, 2019, 3:19 AM EDT