Torna al Thread

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using System.ComponentModel; namespace UtiliWPF { /// <summary> /// Interaction logic for Window1.xaml /// </summary> public partial class Window1 : Window, INotifyPropertyChanged { public Window1() { InitializeComponent(); } string _selectedImage = string.Empty; public string SelectedImagePath { get { return _selectedImage; } set { if (_selectedImage != value) { _selectedImage = value; NotifyPropertyChanged("SelectedImagePath"); } } } private void BtnImg1_Click(object sender, RoutedEventArgs e) { // punto l'immagine this.SelectedImagePath = @"http://www.alessandroalpi.net/images/MVP.png"; } private void BtnImg2_Click(object sender, RoutedEventArgs e) { // punto l'immagine this.SelectedImagePath = @"http://www.alessandroalpi.net/images/dnh.jpg"; } public event PropertyChangedEventHandler PropertyChanged; private void NotifyPropertyChanged(String info) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(info)); } } private void Window_Loaded(object sender, RoutedEventArgs e) { this.DataContext = this; } } }
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5