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

            var testingTarget = new LayoutItem();

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

            LayoutGroup layoutGroup = new LayoutGroup();

            testingTarget.SetParent(layoutGroup);

            try
            {
                testingTarget.RequestLayout(); // Ensures a layout pass is needed.
            }
            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());
            }

            layoutGroup.Dispose();
            testingTarget.Dispose();
            tlog.Debug(tag, $"LayoutItemRequestLayout END (OK)");
        }