C# 入門指南
MainWindow.xaml
<Window x:Class="WpfAppDemo.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:WpfAppDemo"
mc:Ignorable="d"
Title="編密碼小工具" Height="370" Width="800">
<Grid>
<Label Content="輸入" HorizontalAlignment="Left" Margin="20,20,0,0" VerticalAlignment="Top" FontSize="36"/>
<Label Content="輸出" HorizontalAlignment="Left" Margin="20,80,0,0" VerticalAlignment="Top" FontSize="36"/>
<TextBox x:Name="InputText" HorizontalAlignment="Left" Height="40" Margin="100,27,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="660" FontSize="36" TextChanged="InputText_TextChanged"/>
<TextBox x:Name="OutputText" HorizontalAlignment="Left" Height="40" Margin="100,86,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="660" FontSize="36" IsEnabled="False"/>
<Button x:Name="NewButton" Content="新建" HorizontalAlignment="Left" Margin="20,160,0,0" VerticalAlignment="Top" Width="90" FontSize="36" Click="NewButton_Click"/>
<Button x:Name="LoadButton" Content="載入" HorizontalAlignment="Left" Margin="130,160,0,0" VerticalAlignment="Top" Width="90" FontSize="36" Click="LoadButton_Click"/>
<Button x:Name="SaveButton" Content="儲存" HorizontalAlignment="Left" Margin="240,160,0,0" VerticalAlignment="Top" Width="90" FontSize="36" Click="SaveButton_Click"/>
<Button x:Name="Encodebutton" Content="編碼" HorizontalAlignment="Left" Margin="350,160,0,0" VerticalAlignment="Top" Width="90" FontSize="36" Click="Encodebutton_Click"/>
<Button x:Name="DecodeButton" Content="解碼" HorizontalAlignment="Left" Margin="460,160,0,0" VerticalAlignment="Top" Width="90" FontSize="36" Click="DecodeButton_Click"/>
<Button x:Name="CopyButton" Content="拷貝" HorizontalAlignment="Left" Margin="570,160,0,0" VerticalAlignment="Top" Width="90" FontSize="36" Click="CopyButton_Click"/>
<Button x:Name="ClearButton" Content="清除" HorizontalAlignment="Left" Margin="680,160,0,0" VerticalAlignment="Top" Width="90" FontSize="36" Click="ClearButton_Click"/>
<TextBlock x:Name="DisplayBlock" HorizontalAlignment="Left" Margin="20,249,0,0" TextWrapping="Wrap" Text="提示訊息" VerticalAlignment="Top" FontSize="36" Width="740"/>
</Grid>
</Window>
<!-- 《程式語言教學誌》的範例檔案 -->
<!-- http://kaiching.org/ -->
<!-- 專案:WpfAppDemo -->
<!-- 檔名:MainWindow.xaml -->
<!-- 作者:張凱慶 -->