我想在屏幕中间居中弹出用户控件,我该怎么做?
Popup p = new Popup();
p.Child = new loadingtest();
p.isOpen = true;
我想在屏幕中间居中弹出用户控件,我该怎么做?
Popup p = new Popup();
p.Child = new loadingtest();
p.isOpen = true;
var p = new Popup();
var content = new TextBox { Text = "hello world!" };
p.Child = content;
p.VerticalOffset = (this.ActualHeight - content.ActualHeight) / 2;
p.HorizontalOffset = (this.ActualWidth - content.ActualWidth) / 2;
p.IsOpen = true;
PhoneApplicationPage在哪里this
,popup 是LayoutRoot
Grid 的子项。