Ver Mensaje Individual
  #3 (permalink)  
Antiguo 09/12/2015, 03:39
REHome
 
Fecha de Ingreso: mayo-2007
Ubicación: PIC-16F84A
Mensajes: 727
Antigüedad: 17 años
Puntos: 8
Respuesta: ¿Cómo cargar una imagen con un botón?

Buenas:

Disculpe, me olvidé de poner el código. ;)

Código C++:
Ver original
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15.  
  16. namespace Entrada_Arduino_WPF_1_CS
  17. {
  18.     /// <summary>
  19.     /// Lógica de interacción para MainWindow.xaml
  20.     /// </summary>
  21.     public partial class MainWindow : Window
  22.     {
  23.         public MainWindow()
  24.         {
  25.             InitializeComponent();
  26.         }
  27.  
  28.         private void button_Click(object sender, RoutedEventArgs e)
  29.         {
  30.             imagen.Source = (new BitmapImage(new Uri(Led rojo encendido.png, UriKind.Relative)));
  31.             label_Leyendo.Content = "Botón pulsado";
  32.            
  33.         }
  34.     }
  35. }

Saludos.
__________________
Meta Shell, VERSIÓN 1.2.2
Descargar