jjzjj

ParentPopup

全部标签

c# - 在 Windows 10 中检测到布局循环,但在 Windows 8.1 中未检测到

我正在使用一个计时器,它每10秒更新一次布局,直到进度条未完全填满。在Windows8.1中似乎没有问题,但在Windows10中,会抛出LayoutCycleDetectedException。 最佳答案 原代码是privatevoidSetVerticalOffSet(){PopupParentPopup=this.ParentasPopup;if(ParentPopup==null)return;doubleActualVerticalOffset=ParentPopup.VerticalOffset;doubleActual

c# - 如何在窗口中居中弹出窗口(Windows 商店应用程序)

我有一个以编程方式加载的自定义弹出窗口(作为用户控件)。我无法将它置于x轴的中心,只能在垂直方向上。弹出窗口不会添加到xaml文件中,但会添加到根窗口中。usingSystem;usingSystem.Collections.Generic;usingSystem.IO;usingSystem.Linq;usingWindows.Foundation;usingWindows.Foundation.Collections;usingWindows.UI.Xaml;usingWindows.UI.Xaml.Controls;usingWindows.UI.Xaml.Controls.Pr