Пример #1
0
        public static void Bind(ILayout layout, Control control)
        {
            Func <Rectangle> target = () =>
                                      new Rectangle(control.ClientRectangle.Left + Padding,
                                                    control.ClientRectangle.Top + Padding,
                                                    control.ClientRectangle.Width - 2 * Padding,
                                                    control.ClientRectangle.Height - 2 * Padding);

            layout.Apply(control, target());
            control.Resize += delegate
            {
                layout.Apply(control, target());
            };
        }
Пример #2
0
        public void ApplyLayout(ILayout layout)
        {
            if (layout != null)
            {
                layout.Apply(new Rect(new Point(), new Size(ActualWidth, ActualHeight)), RootItem);
                foreach (var pair in layout.LayoutPositions)
                {
                    //    var item = pair.Key;
                    //    var position = pair.Value;

                    //    item.AnimationPosition(position);
                }
            }
        }
Пример #3
0
        public void ApplyLayout(ILayout layout)
        {
            if (layout != null)
            {
                layout.Apply(new Rect(new Point(), new Size(ActualWidth, ActualHeight)), RootItem);
                foreach (var pair in layout.LayoutPositions)
                {
                //    var item = pair.Key;
                //    var position = pair.Value;

                //    item.AnimationPosition(position);
                }
            }
        }