Beispiel #1
0
        public void UseViewBlockSize()
        {
            MockApplication app = MockApplication.Setup <BasicLayoutTest_BlockSizeChanges>();

            UIElement viewRoot = app.RootElement;

            BasicLayoutTest_BlockSizeChanges root = viewRoot as BasicLayoutTest_BlockSizeChanges;

            UIElement blockProvider = root[0];
            UIElement one           = blockProvider[0];
            UIElement two           = blockProvider[1];
            UIElement contentSize   = blockProvider[2];
            UIElement blockUser     = contentSize[0];

            app.GetView(0).SetSize(1920, 1080);

            blockProvider.style.SetPreferredWidth(new UIMeasurement(1f, UIMeasurementUnit.Content), StyleState.Normal);

            app.Update();

            Assert.AreEqual(3, blockProvider.layoutBox.childCount);
            Assert.AreEqual(1920, blockUser.layoutBox.finalWidth);
        }