WPF VB.Net

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Loaded="Window_Loaded" Title="WPF" Height="230" Width="140">
    
        
            
            
        
        
            
            
            
        
        
            
            
        
        
            
            
            
        
    

    
        
        
    


//File:Window.xaml.vb
Imports System
Imports System.Windows
Namespace WpfApplication1
  Public Partial Class Window1
    Inherits Window
    Public Sub New()
      InitializeComponent()
    End Sub
    Private Sub Window_Loaded(sender As Object, e As RoutedEventArgs)
      lbl.Style = DirectCast(FindResource("labelStyle2"), Style)
      img.Style = DirectCast(FindResource("imageStyle2"), Style)
      'lbl.Style = (Style)FindResource("labelStyle1");
      'img.Style = (Style)FindResource("imageStyle1");
    End Sub
  End Class
End Namespace