public void FindDescendantOfType_Finds_Direct_Child()
        {
            StackPanel target;

            var root = new TestRoot
            {
                Child = target = new StackPanel()
            };

            Assert.Equal(target, root.FindDescendantOfType <StackPanel>());
        }
        public void FindDescendantOfType_Finds_Nested_Child()
        {
            Button target;

            var root = new TestRoot
            {
                Child = new StackPanel
                {
                    Children =
                    {
                        new StackPanel
                        {
                            Children =
                            {
                                (target = new Button())
                            }
                        }
                    }
                }
            };

            Assert.Equal(target, root.FindDescendantOfType <Button>());
        }