Skip to content

Commit 886d3f5

Browse files
authored
When the registry key does not exist use the light theme. (#3531)
This is an alternate fix to the one that was originally provided for #3526.
1 parent bb16084 commit 886d3f5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

MaterialDesignThemes.UITests/WPF/TreeListViews/TreeListViewTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,12 @@ public async Task CanMoveTopLevelElementDown()
236236

237237
IVisualElement<TreeListViewItem> secondItem = await treeListView.GetElement<TreeListViewItem>("/TreeListViewItem[1]");
238238

239-
//Move item
239+
await secondItem.LeftClick();
240240
await Wait.For(async () =>
241241
{
242-
await secondItem.LeftClick();
243242
return await secondItem.GetIsSelected();
244243
});
244+
//Move item
245245
await moveDownButton.LeftClick();
246246

247247
await AssertTreeItemContent(treeListView, 0, "0");
@@ -1004,7 +1004,7 @@ public async Task TreeListView_WithCollectionView_RendersItems()
10041004
}
10051005

10061006
[Fact]
1007-
public async Task TreeListView_AddingExpandedItemWithChildren_ShowsExpanedItem()
1007+
public async Task TreeListView_AddingExpandedItemWithChildren_ShowsExpandedItem()
10081008
{
10091009
await using var recorder = new TestRecorder(App);
10101010

MaterialDesignThemes.Wpf/ThemeExtensions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ public static void SetBaseTheme(this Theme theme, BaseTheme baseTheme)
4343
default:
4444
switch (Theme.GetSystemTheme())
4545
{
46-
case BaseTheme.Light:
47-
SetLightTheme(theme);
48-
break;
4946
case BaseTheme.Dark:
5047
SetDarkTheme(theme);
5148
break;
49+
default:
50+
SetLightTheme(theme);
51+
break;
5252
}
5353
break;
5454
}

0 commit comments

Comments
 (0)