Esempio n. 1
0
		internal override void ArrangeInternal (Rect finalRect)
		{
			VisualTreeWalker walker = new VisualTreeWalker (this);
			var child = walker.Step();
			while (child != null) {
				Size desired = child.DesiredSize;
				Rect child_final = new Rect (GetLeft (child), GetTop (child),
							 desired.Width, desired.Height);
				child.Arrange (child_final);
				MonoTouch.UIKit.UIView view = child;
				child.AddToView(this);				
				//child->ClearValue (LayoutInformation::LayoutClipProperty);
				child = walker.Step();
			}

			//return finalSize;
		}
Esempio n. 2
0
        /*
         * internal void SetTemplateBinding (DependencyProperty dp, TemplateBindingExpression tb)
         * {
         *      try {
         *              SetValue (dp, tb);
         *      } catch {
         *              // Do nothing here - The DP should still have its default value
         *      }
         * }
         *
         * public BindingExpressionBase SetBinding (DependencyProperty dp, Binding binding)
         * {
         *      return BindingOperations.SetBinding (this, dp, binding);
         * }
         */
        protected virtual Size MeasureOverride(Size availableSize)
        {
            Size desired = new Size(0, 0);

            availableSize = availableSize.Max(desired);

            VisualTreeWalker walker = new VisualTreeWalker(this);
            UIElement        child  = walker.Step();

            while (child != null)
            {
                child.Measure(availableSize);
                desired = child.DesiredSize;
                child   = walker.Step();
            }

            return(desired.Min(availableSize));
        }
Esempio n. 3
0
        internal override void ArrangeInternal(Rect finalRect)
        {
            VisualTreeWalker walker = new VisualTreeWalker(this);
            var child = walker.Step();

            while (child != null)
            {
                Size desired     = child.DesiredSize;
                Rect child_final = new Rect(GetLeft(child), GetTop(child),
                                            desired.Width, desired.Height);
                child.Arrange(child_final);
                MonoTouch.UIKit.UIView view = child;
                child.AddToView(this);
                //child->ClearValue (LayoutInformation::LayoutClipProperty);
                child = walker.Step();
            }

            //return finalSize;
        }