PBKK B - Latihan Membuat Window WPF

Latihan Membuat Window WPF

14 Maret 2023

Latihan membuat aplikasi Window Presentation Foundation untuk mengelola nama. User menginputkan nama dan aplikasi menampilkan nama yang sudah dibuat.

Referensi Tutorial melalui Learn Microsoft

Source Code / Repository lengkap dapat diakses melalui Github

Dokumentasi




Source Code

<Window x:Class="LatihanWPF.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:LatihanWPF"
mc:Ignorable="d"
Title="Names" Height="300" Width="400">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label>Names</Label>
<ListBox Grid.Row="1" x:Name="lstNames" />
<StackPanel Grid.Row="1" Grid.Column="1" Margin="5,0,0,0">
<TextBox x:Name="txtName" />
<Button x:Name="btnAdd" Margin="0,5,0,0" Click="btnAdd_Click">Add Name</Button>
</StackPanel>
</Grid>
</Window>
view raw MainWindow.xaml hosted with ❤ by GitHub

Nama : Arief Badrus Sholeh
NRP : 5025201228
Kelas : PBKK B
Tahun : 2022/2023

Komentar