/// <summary> /// Arranges wrapped UWP XAML content using passed in size constraint /// </summary> /// <param name="finalSize">Final Size</param> /// <returns>Size</returns> protected override Windows.Foundation.Size ArrangeOverride(Windows.Foundation.Size finalSize) { Windows.UI.Xaml.UIElement element = Child; if (element != null) { try { Windows.Foundation.Rect finalRect = new Windows.Foundation.Rect(0, 0, finalSize.Width / _scalingFactor, finalSize.Height / _scalingFactor); element.Arrange(finalRect); } catch (Exception) { Debugger.Break(); } } return(base.ArrangeOverride(finalSize)); }
public static void arrangeWidget(Windows.UI.Xaml.UIElement widget) { var wi = cave.ui.Widget.getMyWidgetInfo(widget); widget.Arrange(new Windows.Foundation.Rect(wi.x, wi.y, wi.w, wi.h)); }