public static ToWpfRect ( this rect ) : |
||
rect | this | |
return |
void ArrangeChildren(bool force) { if (widgets == null || rects == null) { return; } // Use the 'widgets' field so we can easily map a control position by looking at 'rects'. for (int i = 0; i < widgets.Length; i++) { var element = WidgetBackend.GetFrameworkElement(widgets [i]); if (!element.IsArrangeValid || force) { // Measure the widget again using the allocation constraints. This is necessary // because WPF widgets my cache some measurement information based on the // constraints provided in the last Measure call (which when calculating the // preferred size is normally set to infinite. element.InvalidateMeasure(); element.Measure(new SW.Size(rects[i].Width, rects[i].Height)); element.Arrange(DataConverter.ToWpfRect(rects[i])); element.UpdateLayout(); } } }
public void SetAllocation(IWidgetBackend [] widget, Rectangle [] rect) { for (int i = 0; i < widget.Length; i++) { var e = GetFrameworkElement(widget [i]); e.Arrange(DataConverter.ToWpfRect(rect [i])); } }
void ArrangeChildren(bool force) { if (widgets == null || rects == null) { return; } // Use the 'widgets' field so we can easily map a control position by looking at 'rects'. for (int i = 0; i < widgets.Length; i++) { var element = WidgetBackend.GetFrameworkElement(widgets [i]); if (!element.IsArrangeValid || force) { element.Arrange(DataConverter.ToWpfRect(rects [i])); } } }