-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
178 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml.Data; | ||
using System; | ||
|
||
namespace Sungaila.SUBSTitute.Converters | ||
{ | ||
public partial class ElementThemeToIntConverter : IValueConverter | ||
{ | ||
public object? Convert(object value, Type targetType, object parameter, string language) | ||
{ | ||
if (value is not ElementTheme theme) | ||
return DependencyProperty.UnsetValue; | ||
|
||
return theme switch | ||
{ | ||
ElementTheme.Light => 0, | ||
ElementTheme.Dark => 1, | ||
_ => 2 | ||
}; | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, string language) | ||
{ | ||
if (value is not int selectedIndex) | ||
return DependencyProperty.UnsetValue; | ||
|
||
return selectedIndex switch | ||
{ | ||
0 => ElementTheme.Light, | ||
1 => ElementTheme.Dark, | ||
_ => ElementTheme.Default | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
DefineDosDevice | ||
QueryDosDevice | ||
IFileOpenDialog | ||
FileOpenDialog | ||
CoCreateInstance | ||
GetWindowPlacement |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<linker> | ||
<!-- needed for the FolderPicker --> | ||
<assembly fullname="System.Private.CoreLib"> | ||
<type fullname="System.StubHelpers.InterfaceMarshaler" /> | ||
</assembly> | ||
|
||
<!-- needed for the language name in the settings --> | ||
<assembly fullname="System.Runtime"> | ||
<type fullname="System.Globalization.CultureInfo"> | ||
<property name="NativeName" /> | ||
</type> | ||
</assembly> | ||
|
||
<!-- needed for the SettingsExpander --> | ||
<!-- the app crashes when it is expanded (ItemContainerStyleSelector.SelectStyle fails in ItemsRepeater_ElementPrepared) --> | ||
<assembly fullname="Microsoft.WinUI"> | ||
<type fullname="Microsoft.UI.Xaml.Controls.StyleSelector" /> | ||
</assembly> | ||
</linker> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.