Ejemplo n.º 1
0
        public void TreeViewItemBackgroundShouldBeinherited()
        {
            var expectedBackgroundBrush = new SolidColorBrush(Colors.HotPink);
            var item = new TreeViewItem {
                Header = "Test"
            };

            item.ApplyDefaultStyle();

            item.Background = expectedBackgroundBrush;

            var contentGrid = item.FindVisualChild <Grid>("ContentGrid");

            Assert.Equal(expectedBackgroundBrush, contentGrid.Background);
        }