forked from MaterialDesignInXAML/MaterialDesignInXamlToolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTreeViewTests.cs
More file actions
28 lines (25 loc) · 813 Bytes
/
TreeViewTests.cs
File metadata and controls
28 lines (25 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using Xunit;
namespace MaterialDesignThemes.Wpf.Tests
{
public class TreeViewTests
{
[StaFact]
[Description("Issue 2135")]
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);
}
}
}