Files
OmagVIEW/Application.xaml.vb
Renzo Lanza a84450d377 OmagVIEW 2.1i1 :
- Aggiunto il tema Dark, con cambio tema nel dialog delle Opzioni (lettura/scrittura da file INI, come per OmagCUT)
2019-09-24 15:08:09 +00:00

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