登录是程序中重要的一部分,实现WPF登录窗口功能很简单
一、XAML界面代码:
<Window x:Class="TTS_Client.Login"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Icon="lmages/3.png" Title="登录" Height="280" Width="390"
WindowStartupLocation="CenterScreen" //设置窗口首次显示时的位置。
ResizeMode="NoResize" //设置调整窗体大小模式。
Background="Transparent" //设置一个用于描述控件的背景画笔。
AllowsTransparency="True" //设置一个值,该值指示窗口的工作区是否支持透明度。
WindowStyle="None"> //设置窗口的边框样式。
二、定义列和行组成的网格区域
Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="50"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"<