예제 #1
0
파일: Region.cs 프로젝트: Aethon/odo
        // 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);
            }
        }
예제 #2
0
파일: Region.cs 프로젝트: Aethon/odo
 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();
 }
예제 #3
0
파일: UiElement.cs 프로젝트: Aethon/odo
        public virtual void Measure(Size size)
        {
            // default measurement
            int width = XAxis.EffectiveLength();
            int height = YAxis.EffectiveLength();

            MeasuredSize = new Size(width, height);
        }
예제 #4
0
파일: ListBox.cs 프로젝트: Aethon/odo
 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;
      */
 }