当前位置:  编程技术>.net/c#/asp.net

高仿Windows Phone QQ登录界面实例代码

    来源: 互联网  发布时间:2014-08-25

    本文导语:  给 TextBox文本框前添加图片 扩展PhoneTextBox:添加一个类“ExtentPhoneTextBox”继承 PhoneTextBox ,在“ExtentPhoneTextBox”类中添加属性项: 代码如下:public class ExtentPhoneTextBox : PhoneTextBox    {        ///         /// 文本框图片属性 ...

给 TextBox文本框前添加图片

扩展PhoneTextBox:添加一个类“ExtentPhoneTextBox”继承 PhoneTextBox ,在“ExtentPhoneTextBox”类中添加属性项:

代码如下:

public class ExtentPhoneTextBox : PhoneTextBox
    {
        ///
        /// 文本框图片属性
        ///
        public static readonly DependencyProperty TextHeadImageProperty =
            DependencyProperty.Register("TextHeadImage", typeof(ImageSource), typeof(ExtentPhoneTextBox), new PropertyMetadata(null)
            );

        ///
        /// 文本框头图片
        ///
        public ImageSource TextHeadImage
        {
            get { return base.GetValue(TextHeadImageProperty) as ImageSource; }
            set { base.SetValue(TextHeadImageProperty, value); }
        }

        ///
        /// 文本图片宽度
        ///
        public double TextHeadImageWidth
        {
            get { return (double)GetValue(TextHeadImageWidthProperty); }
            set { SetValue(TextHeadImageWidthProperty, value); }
        }

        // Using a DependencyProperty as the backing store for TextHeadImageWidth.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty TextHeadImageWidthProperty =
            DependencyProperty.Register("TextHeadImageWidth", typeof(double), typeof(ExtentPhoneTextBox), new PropertyMetadata(null));

        ///
        /// 文本图片高度
        ///
        public double TextHeadImageHeight
        {
            get { return (double)GetValue(TextHeadImageHeightProperty); }
            set { SetValue(TextHeadImageHeightProperty, value); }
        }

        // Using a DependencyProperty as the backing store for TextHeadImageHeight.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty TextHeadImageHeightProperty =
            DependencyProperty.Register("TextHeadImageHeight", typeof(double), typeof(ExtentPhoneTextBox), new PropertyMetadata(null));
    }
}


ExtentPhoneText 样式编辑:

全部样式如下:

代码如下:


           
               
                   
               
           
       
       
       
           
           
           
           
           
           
           
           
           
           
           
               
                   
                       
                           
                               
                               
                           
                           
                               
                                   
                                   
                                       
                                           
                                               
                                           
                                           
                                               
                                           
                                           
                                               
                                           
                                           
                                               
                                           
                                       
                                   
                                   
                                       
                                           
                                               
                                                   
                                                        Collapsed
                                                   
                                               
                                           
                                           
                                               
                                                   
                                                        Visible
                                                   
                                               
                                           
                                           
                                               
                                           
                                           
                                               
                                           
                                           
                                               
                                           
                                       
                                   
                               
                               
                                   
                                       
                                           
                                               
                                           
                                           
                                               
                                           
                                       
                                   
                                   
                               
                               
                                   
                                       
                                           
                                               
                                                   
                                                       
                                                            Visible
                                                       
                                                   
                                               
                                               
                                                   
                                               
                                               
                                                   
                                               
                                               
                                                   
                                                       
                                                   
                                               
                                           
                                       
                                       
                                           
                                               
                                                   
                                                       
                                                   
                                               
                                               
                                                   
                                               
                                               
                                                   
                                               
                                               
                                                   
                                                       
                                                            Collapsed
                                                       
                                                   
                                               
                                           
                                       
                                   
                                   
                                       
                                           
                                               
                                                   
                                                        Visible
                                                   
                                               
                                           
                                           
                                               
                                           
                                           
                                               
                                           
                                           
                                       
                                   
                                   
                               
                           
                           
                           
                               
                                   
                                       
                                   
                               
                           
                           
                               
                           
                           
                           
                               
                                   
                                   
                               
                           
                           
                               
                                   
                               
                           
                           
                       
                   
               
           
       

UI部局xaml代码如下:

           
           

           
           
           
           
           

       
运行效果如下:


    
 
 

您可能感兴趣的文章:

  • c# 在windows服务中 使用定时器实例代码
  • LINUX 或者Windows 如何保证一个进程只有一个实例在运行?如果是C语言,JAVA语言开发,又怎么样保证?
  • python在windows下实现备份程序实例
  • C#利用Windows自带gdi32.dll实现抓取屏幕功能实例
  • C#获取Windows进程监听的TCP/UDP端口实例
  • c#创建windows服务入门教程实例
  • c# 对windows用户和组操作实例
  • C#编写Windows服务实例代码
  • C#启动和停止windows服务的实例代码
  • C#开发Windows服务实例之实现禁止QQ运行
  • Windows中使用计划任务自动执行PHP程序实例
  • Windows程序内部运行机制实例详解
  • C#编写的windows计算器的实例代码
  • 请指点: 在windows下能否通过程序来获取linux下的用户列表,甚至通过自己写的windows程序界面增加修改linux的用户
  • 在x windows下,怎样进入文字操作界面??
  • Windows高级界面开发库 MuiLib
  • UNIX 环境下大家开发Windows界面的工具都用什么开发工具?
  • 请教:如何在windows环境下以图形界面登录linux?
  • 请指点: 在windows下能否通过程序来获取linux下的用户列表,甚至通过自己写的windows程序界面增加修改linux的用户 100分相赠
  • linux和windows相比空间有什么好的地方呀?听说在linux下图形界面要比windows慢?
  • 在Red hat 是否支持类似windows的远程终端进行图形界面操作?
  • 超简单问题,Turbolinux启动后,以Root登陆后什么命令进入x-windows界面
  • unix下的FTP工具是什么?就象windows下的cuteftp那种图形界面的。。
  • 如何在windows命令行下模仿类linux shell界面
  • 关于linux windows mac图形界面 内核的问题
  • 求助!如何在没有图形界面的LINUX下压缩文件夹,并将这个压缩文件在windows下解压?
  • 如何让系统启动的时候自动进入命令界面而不是进入X Windows
  • 怎样在windows下远程访问linux服务器的图形用户界面呢?
  • 昨天装了个linux,怎么启动后进去是图形界面啊(像windows那样的)
  • 请问大家:我先装windows然后用虚拟机的方法装linux,可是装后,启动linux界面,其下面
  • 100分每次要先进WINDOWS到登录界面,然后才能进linux.这是那儿坏了,该怎么办?
  •  
    本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
    本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • 求助!为什么linux下FTP允许windows登录而不允许linux登录?在线等
  • linux (ubantu) 如何远程登录 windows (xp/vista)?
  • pure-ftp如何在windows下弹出登录提示窗口?
  • 如何从Kubuntu虚拟机远程登录到windows主机
  • 怎样从windows登录到linux
  • linux的登录程序能像windows的那样,可以修改么?
  • 在Windows,SecureCRT用SSH1远程登录出错
  • 用windows远程登录ubuntu10.10的问题
  • 如何在windows下远程登录linux的终端?
  • 请问大家,在同一台机器上,能从windows登录linux系统吗?
  • 在 WINDOWS 2000 用 TELNET + IP 登录到 UNIX 中,怎样 GET UNIX 中的指定文件?
  • 请问Linux如何象Windows 那样把我的程序放到启动里面,登录后启动我的程序
  • 使用xp_cmdshell注销Windows登录用户(终端服务器超出最大连接数)
  • 可不可以在windows下通过ssh登录本机linux系统呢??
  • samba服务器加入windows域,域用户不能登录系统
  • Windows中用什么软件可以远程登录到Linux中?
  • 没有sa密码无法集成windows身份验证登录的解决方法
  • 局域网中linux客户机如何登录到windows2000 server域?
  • 利用SQL SERVER建立登录WINDOWS帐号
  • 请问Linux如何象Windows 那样把我的程序放到启动里面,登录后启动我的程序
  • java命名空间java.awt.event类keyevent的类成员方法: vk_windows定义及介绍
  • 怎么在Linux下改windows系统文件啊,我把windows的BOOT.INI改了,windows启动不了
  • WinDows8最新版文件夹加密
  • x-windows如何安装在linux(rdehat9)上面呢,是不是x-windows也分windows和linux版本的吗?
  • 修改Windows硬盘分区名称
  • linux和windows串口问题!?linux向windows端发送,第一次write正常,继续write,windows接收到的就变成乱码了,这是什么原因??????
  • windows10玩游戏怎么样?唯一支持DirectX 12的windows
  • 装了Linux和Windows,怎样默认进入Windows
  • windows/windows 7/windows 8 下打开查看、修改及保存超大(GB级)文本文件及其它类型文件的工具-PilotEdit
  • Linux与windows共存时,如何将Windows设置为默认启动系统?
  • windows下tinyxml.dll下载安装使用(c++解析XML库)


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3