4 Public Class MainWindow
8 Me.InitializeComponent()
9 Me.skinComboBox
.Items
.Add("Blue")
10 Me.skinComboBox
.Items
.Add("Yellow")
11 Me.skinComboBox
.SelectedIndex
= 0
12 Application
.Current
.Resources
= DirectCast(Application
.Current
.Properties
.Item("Blue"), ResourceDictionary
)
13 AddHandler
Me.skinComboBox
.SelectionChanged
, New SelectionChangedEventHandler(AddressOf
Me.skinComboBox_SelectionChanged
)
16 Private Sub newChildWindowButton_Click(ByVal sender
As Object, ByVal e
As RoutedEventArgs
)
17 Dim window
As ChildWindow
= New ChildWindow
21 Private Sub skinComboBox_SelectionChanged(ByVal sender
As Object, ByVal e
As SelectionChangedEventArgs
)
22 Dim skin
As String = CStr(e
.AddedItems
.Item(0))
23 Application
.Current
.Resources
= DirectCast(Application
.Current
.Properties
.Item(skin
), ResourceDictionary
)