// recursively lays out the region public void LayOut() { Size c; if (Host == null || Host.TagName != "DIV") throw new Exception("Host must be a div element"); jQueryObject div = jQuery.FromElement(Host); div.CSS("padding", "0px"); int width = div.GetInnerWidth(); int height = div.GetInnerHeight(); if (width == 0 && height == 0) { width = int.Parse(div.GetCSS("width")); height = int.Parse(div.GetCSS("height")); } c = new Size(width, height); if (Child != null) { Child.Measure(c); AxisArrangement xaxis = ArrangeAxis(Child.XAxis, Child.MeasuredSize.Width, c.Width); AxisArrangement yaxis = ArrangeAxis(Child.YAxis, Child.MeasuredSize.Height, c.Height); Child.Arrange(xaxis, yaxis, Host); } }
public override void Measure(Size size) { // do not call base; this control does not measure itself, instead it uses the host's dimensions MeasuredSize = size.Clone(); }
public virtual void Measure(Size size) { // default measurement int width = XAxis.EffectiveLength(); int height = YAxis.EffectiveLength(); MeasuredSize = new Size(width, height); }
public override void Measure(Size size) { /* TODO if (_stackPanel == null) { _stackPanel = new VirtualStackPanel(); _stackPanel.SetParent(this); _stackPanel.Horizontal = Horizontal; _stackPanel.Vertical = Vertical; _stackPanel.FixedItemHeight = FixedItemHeight; _stackPanel.ItemContainerGenerator = ItemContainerGenerator; } _stackPanel.Measure(size); MeasuredSize = _stackPanel.MeasuredSize; */ }