Example #1
0
        public void LayoutGroupRemoveChildFromLayoutGroup()
        {
            tlog.Debug(tag, $"LayoutGroupRemoveChildFromLayoutGroup START");

            LayoutItem layoutItem = new AbsoluteLayout();

            View parent = new View();

            View child = new View()
            {
                ExcludeLayouting = false,
                Layout           = new AbsoluteLayout()
            };

            parent.Add(child);

            layoutItem.AttachToOwner(child);

            var testingTarget = new MyLayoutGroup();

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <LayoutGroup>(testingTarget, "Should be an instance of LayoutGroup type.");

            testingTarget.Add(layoutItem);

            try
            {
                testingTarget.RemoveChildFromLayoutGroup(child);
            }
            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());
            }

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