Пример #1
0
        public void ShouldUpdateCanvasLeftPropertyWhenSettingLeftInNonModalWindow()
        {
            TestableFloatableWindowAdapter window = this.CreateTestableAdapter();

            double left = (double)window.WrappedWindow.GetValue(Canvas.LeftProperty);

            Assert.AreEqual(0, left);
            Assert.AreEqual(0, window.Left);

            window.Left = 15;

            window.Show(this.rootPanel);

            left = (double)window.WrappedWindow.GetValue(Canvas.LeftProperty);

            Assert.AreEqual(15, left);
        }
Пример #2
0
        public void ShouldUpdateCanvasTopPropertyWhenSettingTopInNonModalWindow()
        {
            TestableFloatableWindowAdapter window = this.CreateTestableAdapter();

            double top = (double)window.WrappedWindow.GetValue(Canvas.TopProperty);

            Assert.AreEqual(0, top);
            Assert.AreEqual(0, window.Top);

            window.Top = 15;

            window.Show(this.rootPanel);

            top = (double)window.WrappedWindow.GetValue(Canvas.TopProperty);

            Assert.AreEqual(15, top);
        }