public void BringDescendentIntoView_Should_Handle_Child_Margin()
        {
            Border border;
            var    target = new ScrollContentPresenter
            {
                Width   = 100,
                Height  = 100,
                Content = new Decorator
                {
                    Margin = new Thickness(50),
                    Child  = border = new Border
                    {
                        Width  = 200,
                        Height = 200,
                    }
                }
            };

            target.UpdateChild();
            target.Measure(Size.Infinity);
            target.Arrange(new Rect(0, 0, 100, 100));
            target.BringDescendentIntoView(border, new Rect(200, 200, 0, 0));

            Assert.Equal(new Vector(150, 150), target.Offset);
        }
        public void BringDescendentIntoView_Should_Update_Offset()
        {
            var target = new ScrollContentPresenter
            {
                Width   = 100,
                Height  = 100,
                Content = new Border
                {
                    Width  = 200,
                    Height = 200,
                }
            };

            target.UpdateChild();
            target.Measure(Size.Infinity);
            target.Arrange(new Rect(0, 0, 100, 100));
            target.BringDescendentIntoView(target.Child, new Rect(200, 200, 0, 0));

            Assert.Equal(new Vector(100, 100), target.Offset);
        }