WPF C# Tutorial

    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.cs
using System;
using System.Windows;
namespace WpfApplication1
{
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            lbl.Style = (Style)FindResource("labelStyle2");
            img.Style = (Style)FindResource("imageStyle2");
            //lbl.Style = (Style)FindResource("labelStyle1");
            //img.Style = (Style)FindResource("imageStyle1");
        }
    }
}