美术水平有限,不喜勿喷。

界面代码,效果如下图

<UserControl x:Class="ElecDemoTelerikSL.Login"
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:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
xmlns:my="clr-namespace:Drawsee.Sl.AppBase.UserManage.UI;assembly=Drawsee.Sl.AppBase"
mc:Ignorable="d"
d:DesignHeight="" d:DesignWidth=""> <Grid x:Name="LayoutRoot" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled">
<Grid.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF007CC3"/>
<GradientStop Color="#FF93CAE2" Offset=""/>
</LinearGradientBrush>
</Grid.Background>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="登陆测试" FontSize="" HorizontalAlignment="Center" Margin="0,0,0,20" />
<Grid Width="" Height="">
<Rectangle Fill="#50000000" RadiusX="" RadiusY="" Margin="10,10,-10,-15" />
<Image Source="images/elec_background.jpg" Height="" HorizontalAlignment="Center" Name="imageBackground" Stretch="Fill" VerticalAlignment="Center" Width="">
<Image.Clip>
<RectangleGeometry RadiusX="" RadiusY="" Rect="0,0,600,300" />
</Image.Clip>
</Image>
<Border BorderBrush="#80000000" BorderThickness="" CornerRadius="" >
</Border>
<Grid Margin="358,124,29,42">
<Rectangle Stretch="Fill" Fill="#4FFFFFFF" RadiusX="" RadiusY="" />
<sdk:Label Content="登录名:" Height="" HorizontalAlignment="Left" Name="lblLoginName" VerticalAlignment="Top" Width="" Margin="11,20,0,0" />
<sdk:Label Content="密 码:" Height="" HorizontalAlignment="Left" Name="lblLoginPwd" VerticalAlignment="Top" Width="" Margin="11,58,0,0" />
<TextBox Height="" HorizontalAlignment="Left" Name="txtLoginName" VerticalAlignment="Top" Width="" Margin="77,17,0,0" />
<PasswordBox Height="" HorizontalAlignment="Left" Margin="77,55,0,0" Name="txtLoginPwd" VerticalAlignment="Top" Width="" />
<Button Content="登陆" Height="" HorizontalAlignment="Left" Name="btnLogin" VerticalAlignment="Top" Width="" Margin="22,95,0,0" Click="btnLogin_Click" />
<Button Content="取消" Height="" HorizontalAlignment="Left" Name="btnCancel" VerticalAlignment="Top" Width="" Margin="122,95,0,0" />
</Grid>
</Grid>
</StackPanel>
</Grid>
</UserControl>

后台代码

public partial class Login : UserControl
{
public Login()
{
InitializeComponent(); txtLoginName.Text = "admin";
} private void btnLogin_Click(object sender, RoutedEventArgs e)
{
string loginName =txtLoginName.Text.Trim();
string loginPwd =txtLoginPwd.Password.Trim();
if (loginName.Equals("admin") && loginName.Equals("admin"))
this.Content = new MainPage(); //跳转到主页面
else
MessageBox.Show("登陆失败!", "提示", MessageBoxButton.OKCancel);
}
}

主页面xaml

<UserControl x:Class="SilverlightCreate.MainTest"
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:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
xmlns:my="clr-namespace:SilverlightCreate"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="1800" > <Grid x:Name="LayoutRoot" VerticalAlignment="Stretch">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions> <Grid Grid.Row="0" >
<Grid.Background>
<LinearGradientBrush >
<GradientStop Color="#FF007CC3" Offset="0.5" />
<GradientStop Color="#FFa9dcfa" Offset="1" />
</LinearGradientBrush>
</Grid.Background> <HyperlinkButton Content="操作说明" HorizontalAlignment="Right" VerticalAlignment="Bottom" Foreground="AliceBlue" NavigateUri="http://www.baidu.com" TargetName="_blank" FontSize="16" IsTabStop="False" Height="24" Name="hlbHelp" Width="68" Margin="0,0,0,12" />
<my:ToolBar HorizontalAlignment="Right" Margin="0,33,100,0" Padding="2" x:Name="toolBar1" VerticalAlignment="Top" />
</Grid>
<Grid x:Name="GridMain" Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="290" />
<ColumnDefinition Width="5" />
<ColumnDefinition Width="665*" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" x:Name="system"> <Border BorderBrush="LightGray" BorderThickness="1" CornerRadius="0" />
</Grid>
<sdk:GridSplitter Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Stretch" Background="#FF027DC3"></sdk:GridSplitter>
<Grid Grid.Column="2">
<Grid x:Name="GridFrame">
<Border BorderBrush="LightGray" BorderThickness="1" CornerRadius="0"> </Border>
</Grid>
</Grid>
</Grid>
</Grid>
</Grid>
</UserControl>

Silverlight 登陆界面的更多相关文章

  1. [Django]登陆界面以及用户登入登出权限

    前言:简单的登陆界面展现,以及用户登陆登出,最后用户权限的问题 正文: 首先需要在settings.py设置ROOT_URLCONF,默认值为: ROOT_URLCONF  = 'www.urls'# ...

  2. outlook 2016 for windows 每次刷新发送接收邮件会弹出登陆界面

    Q: outlook2016 for windows 每次刷新发送接收邮件会弹出登陆界面,office365 ProPlus 都是正常激活了,Word 和Excel都不存在此类问题 A: 排除用户的o ...

  3. javafx之登陆界面的跳转

    界面布局用到的是fxml而非纯java代码,工具是javafx sence builder 账号:account 密码:password 登陆成功: 可以点击退出登陆返回到登陆页面 工程目录: pac ...

  4. Altium Designer15 卡在登陆界面解决办法:

    Altium Designer15 卡在登陆界面解决办法: 在我的电脑系统盘中找到下面目录(注:如果看不到,需要取消隐藏文件选项.) C:\Documents and Settings\Adminis ...

  5. 描述Linux系统开机到登陆界面的启动过程(计时2分钟)

    简述: 1.开机BIOS自检 2.MBR引导 3.grub引导菜单 4.加载内核kernel 5.启动init进程 6.读取inittab文件,执行rc.sysinit,rc等脚本 7.启动minge ...

  6. alertDialog创建登陆界面,判断用户输入

    alertDialog创建登陆界面,需要获取用户输入的用户名和密码,获取控件对象的时候不能像主布局文件那样获得, 需要在onClickListener中获取,代码如下: public boolean ...

  7. 解决Ubuntu输入正确密码后无法进入桌面,一直停留在登陆界面的问题

    在登陆界面按下Ctrl + Shift + F1 进入命令行模式,输入你的用户名和密码之后,敲入下面几行命令就可以了! $ cd - $ sudo chown 你的用户名:你的用户名 .Xauthor ...

  8. Web 登陆界面---简单模块1

    今天学习登陆界面的基本模块,其中几个基本的元素 a元素.form元素.布局元素(table\tr\td).加粗(b).input元素 1.<a href="">内容&l ...

  9. 一个简单WPF登陆界面,包含记住密码,自动登录等功能,简洁美观

    简介:这是一个自己以前用WPF设计的登陆界面,属于一个实验性的界面窗体,如果用于产品还很有不足.但也是有一点学习价值.后台代码略有复杂,但基本上都有注释 分类,略有代码经验的一般都能看懂. 登陆界面外 ...

随机推荐

  1. js之__proto__原型链

    可参考: http://blog.csdn.net/irelandken/article/details/7297490

  2. Operating System-Kickoff:什么是操作系统&&操作系统的核心概念

    接下来会写一系列Operating System(操作系统)的文章,今天先开个头.本文主要内容: 什么是操作系统 操作系统的核心概念 程序=数据结构+算法 一.什么是操作系统 1.1 操作系统是对硬件 ...

  3. 数据库:mysql 获取刚插入行id[转]

    我们在写数据库程序的时候,经常会需要获取某个表中的最大序号数, 一般情况下获取刚插入的数据的id,使用select max(id) from table 是可以的.但在多线程情况下,就不行了. 下面介 ...

  4. python 基础 列表 小例子

    存主机ip到列表 host_list=[] netip='192.168.1' for hostip in range(1,254): ip = netip +str(hostip) host_lis ...

  5. TCP/IP的3次握手和4次握手

    在TCP/IP协议中,TCP协议提供可靠的连接服务,采用三次握手建立一个连接,如图1所示. (1) 第一次握手:建立连接时,客户端A发送SYN包(SYN=j)到服务器B,并进入SYN_SEND状态,等 ...

  6. zabbix的配置

    一.网络自动发现: 1.zabbix的网络自动发现是一个非常强大的功能,该功能可以完成以下工作. a.快速发现并添加主机. b.简单的管理. c.随着环境的改变而快速搭建监控系统. 2.网络发现基于以 ...

  7. centos7安装与配置ansible

    此次测试总共有三台机,分别如下: ansible服务器:10.0.0.20 client01:10.0.0.21 client02:10.0.0.22 一.安装ansible 1. python版本需 ...

  8. 关于android中两种service的编写简单总结

    1.startservice (两种方法,继承service类或者继承intentservice 类) 继承service类,在onstartcommend重载方法中实现业务逻辑的处理,如果耗时过长最 ...

  9. layui 常用方法 readme

    layui样式加载: layui.use(['table', 'element', 'laydate', 'layer'], function () { var table = layui.table ...

  10. hadoop fs -put上传文件失败,WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Problem connecting to server: master:8020

    hadoop fs -put上传文件失败 报错信息:(test文件夹是已经成功建好的) [root@master ~]# hadoop fs -put test1.txt /test // :: WA ...