a84450d377
- Aggiunto il tema Dark, con cambio tema nel dialog delle Opzioni (lettura/scrittura da file INI, come per OmagCUT)
23 lines
743 B
VB.net
23 lines
743 B
VB.net
Class Application
|
|
|
|
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
|
|
' can be handled in this file.
|
|
|
|
Public Property ThemeDictionary As ResourceDictionary
|
|
' You could probably get it via its name with some query logic as well.
|
|
Get
|
|
Return Resources.MergedDictionaries(0)
|
|
End Get
|
|
Set(value As ResourceDictionary)
|
|
End Set
|
|
End Property
|
|
|
|
Public Sub ChangeTheme(uri As Uri)
|
|
ThemeDictionary.MergedDictionaries.RemoveAt(0) ' Clear()
|
|
Dim rd As ResourceDictionary = New ResourceDictionary()
|
|
rd.Source = uri
|
|
ThemeDictionary.MergedDictionaries.Add(rd) ' New ResourceDictionary()) ' Source:=uri))
|
|
End Sub
|
|
|
|
End Class
|