0
팝업을 화면 중앙에 정확하게 배치하고 싶습니다. 나는 팝업 내에서 표시하기 위해 Usercontrol을 사용했다. 그러나 HorizontalOffset 및 수직 오프셋 계산 방법은 잘못되었습니다.팝업/UserControl 중앙에 넣기
Popup popUp = new Popup();
ProgressScreen progressScreen = new ProgressScreen();
popUp.Child = progressScreen;
//popUp.HorizontalOffset = (this.ActualWidth/2) + (progressScreen.ActualWidth/2);
popUp.VerticalOffset = (this.ActualHeight/2) + (progressScreen.ActualHeight/2);
popUp.HorizontalOffset = (this.ActualWidth - progressScreen.ActualWidth)/2;
popUp.Height = this.ActualHeight;
popUp.Width = this.ActualWidth;
popUp.IsOpen = true;