Tugas 4 : Pemrograman Berbasis Kerangka Kerja (B)
Tugas 4 : Pemrograman Berbasis Kerangka Kerja (B)
Nama : Lihardo Marson Purba
NRP : 5025211238
Kelas : PBKK - B
Photolab menggunakan UWP
Pada tugas-4 ini kami diminta untuk membuat form dengan fungsionalitas memasukkan nama dan menampilkan daftar nama yang telah dimasukkan. WPF membantu dalam pembuatan aplikasi ini.
Link Repository : https://github.com/Lihardo238/Photolab-UWP.git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
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; | |
namespace WPF_Pertemuan3_PBKK_B | |
{ | |
/// <summary> | |
/// Interaction logic for MainWindow.xaml | |
/// </summary> | |
public partial class MainWindow : Window | |
{ | |
private ObservableCollection<string> names = new ObservableCollection<string>(); | |
public MainWindow() | |
{ | |
InitializeComponent(); | |
nameListBox.ItemsSource = names; | |
} | |
private void AddNameButton_Click(object sender, RoutedEventArgs e) | |
{ | |
string newName = nameTextBox.Text.Trim(); | |
if (!string.IsNullOrEmpty(newName)) | |
{ | |
names.Add(newName); | |
nameTextBox.Clear(); | |
} | |
} | |
} | |
} |
Dokumentasi :
Komentar
Posting Komentar