コード例 #1
0
        public void LayoutGroupOnLayoutIndependentChildren()
        {
            tlog.Debug(tag, $"LayoutGroupOnLayoutIndependentChildren START");

            using (View owner = new View())
            {
                TextLabel textLabel = new TextLabel()
                {
                    ExcludeLayouting = false,
                    Size             = new Size(100, 150),
                    Layout           = new AbsoluteLayout(),
                };

                owner.Add(textLabel);

                using (MyLayoutGroup testingTarget = new MyLayoutGroup())
                {
                    testingTarget.AttachToOwner(owner);
                    try
                    {
                        testingTarget.OnLayoutIndependentChildren(true, new LayoutLength(5), new LayoutLength(5), new LayoutLength(5), new LayoutLength(5));
                    }
                    catch (Exception e)
                    {
                        tlog.Error(tag, "Caught Exception" + e.ToString());
                        LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
                        Assert.Fail("Caught Exception" + e.ToString());
                    }
                }

                textLabel.Dispose();
            }

            tlog.Debug(tag, $"LayoutGroupOnLayoutIndependentChildren END (OK)");
        }