//File:Window.xaml.vb Imports System Imports System.Collections.Generic Imports System.Text Imports System.Windows Imports System.Windows.Controls Imports System.Windows.Data Imports System.Windows.Documents Imports System.Windows.Input Imports System.Windows.Media Imports System.Windows.Media.Imaging Imports System.Windows.Shapes Namespace WpfApplication1 Public Partial Class MainWindow Inherits Window Public Sub New() InitializeComponent() lstStyles.Items.Add("TiltStyle") lstStyles.Items.Add("GreenStyle") lstStyles.Items.Add("MouseOverStyle") End Sub Protected Sub comboStyles_Changed(sender As Object, args As RoutedEventArgs) Dim currStyle As System.Windows.Style = DirectCast(FindResource(lstStyles.SelectedValue), System.Windows.Style) Me.btnMouseOverStyle.Style = currStyle End Sub Protected Sub btnMouseOverStyle_Click(sender As Object, args As RoutedEventArgs) MessageBox.Show("Clicked") End Sub End Class End Namespace