当前位置: 首页 > news >正文

做网站大概要花多少钱如何做一个营销方案

做网站大概要花多少钱,如何做一个营销方案,网站建设和网络搭建是一回事吗,当当网网站建设步骤1&#xff0c;效果 2&#xff0c;代码&#xff1a; WPF的PasswordBox不能像Winform中的PasswordBox那样&#xff0c;通过PasswordBox.PasswordChar(char)0显示明文。所以这里使用无外观控件构筑掩码明文切换。 无外观控件遵守Themes/Generic.xaml文件配置. <ResourceDicti…

1,效果

 

2,代码:

        WPF的PasswordBox不能像Winform中的PasswordBox那样,通过PasswordBox.PasswordChar=(char)0显示明文。所以这里使用无外观控件构筑掩码明文切换。

无外观控件遵守Themes/Generic.xaml文件配置.

<ResourceDictionaryxmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:local="clr-namespace:StudentInfoManagerWPF"><Style TargetType="{x:Type local:PasswordBoxExt}"><Setter Property="Template"><Setter.Value><ControlTemplate TargetType="{x:Type local:PasswordBoxExt}"><Grid><PasswordBox  x:Name="Part_Pwd"  VerticalContentAlignment="Center" Padding="0,0,30,0"  PasswordChar="{TemplateBinding PasswordChar}"></PasswordBox><TextBox x:Name="Part_TxtBox" VerticalContentAlignment="Center" Padding="0,0,30,0" Visibility="Collapsed" Text="{Binding RelativeSource={RelativeSource  Mode=FindAncestor,   AncestorType=local:PasswordBoxExt, AncestorLevel=1}, Path=Password}"></TextBox><ToggleButton x:Name="Part_Toggle"  HorizontalAlignment="Right" MaxWidth="30" ><ToggleButton.Template><ControlTemplate TargetType="ToggleButton"><Grid><Image x:Name="Part_ImgShow" Source="/icon/1.png" Visibility="Collapsed"></Image><Image x:Name="Part_ImgHide" Source="/Icon/2.png" Visibility="Visible"></Image></Grid><ControlTemplate.Triggers ><Trigger Property="IsChecked" Value="true"><Setter Property="Visibility" Value="Visible" TargetName="Part_ImgShow"></Setter><Setter Property="Visibility" Value="Collapsed" TargetName="Part_ImgHide"></Setter></Trigger></ControlTemplate.Triggers></ControlTemplate></ToggleButton.Template></ToggleButton></Grid><ControlTemplate.Triggers><Trigger SourceName="Part_Toggle" Property="IsChecked" Value="true"><Setter TargetName="Part_TxtBox" Property="Visibility" Value="Visible"></Setter></Trigger></ControlTemplate.Triggers></ControlTemplate></Setter.Value></Setter></Style>
</ResourceDictionary>
public class PasswordBoxExt : Control{public static readonly DependencyProperty PasswordProperty;public static readonly DependencyProperty PasswordCharProperty;PasswordBox passwordBox;static PasswordBoxExt(){DefaultStyleKeyProperty.OverrideMetadata(typeof(PasswordBoxExt), new FrameworkPropertyMetadata(typeof(PasswordBoxExt)));PasswordProperty = DependencyProperty.Register("Password", typeof(string), typeof(PasswordBoxExt),new PropertyMetadata(new PropertyChangedCallback(PasswordPropertyChanged)));PasswordCharProperty = DependencyProperty.Register("PasswordChar", typeof(char), typeof(PasswordBoxExt), new PropertyMetadata('*'));}private static void PasswordPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e){//如此每次变化均导致passwordbox被重新覆盖新值,致使光标每次置于字符串首位而不是字符串末尾//if( (d as PasswordBoxExt).passwordBox != null)// {//     (d as PasswordBoxExt).passwordBox.Password = e.NewValue.ToString();// }}/// <summary>/// 密码/// </summary>public string Password{get{return (string)GetValue(PasswordProperty);}set{SetValue(PasswordProperty, value);}}/// <summary>/// 掩码字符/// </summary>public char PasswordChar{get{return (char)GetValue(PasswordCharProperty);}set{SetValue(PasswordCharProperty, value);}}public override void OnApplyTemplate(){base.OnApplyTemplate();passwordBox=  this.GetTemplateChild("Part_Pwd") as PasswordBox;ToggleButton btn = this.GetTemplateChild("Part_Toggle") as ToggleButton;if (passwordBox != null){passwordBox.PasswordChanged += Pwdbox_PasswordChanged;}if (btn != null){btn.Click += Btn_Click;}}private void Btn_Click(object sender, RoutedEventArgs e){if((sender as ToggleButton).IsChecked == false){passwordBox.Password = Password;}}private void Pwdbox_PasswordChanged(object sender, RoutedEventArgs e){if(sender is PasswordBox){Password = (sender as PasswordBox).Password;}}}

添加自定义控件

<DockPanel  Grid.Row="2" Grid.Column="1"  VerticalAlignment="Center"><TextBlock Text="密码:"  DockPanel.Dock="Left"   FontSize="16"></TextBlock><local:PasswordBoxExt x:Name="pwd01" PasswordChar="#" DockPanel.Dock="Right"  MinHeight="30" Margin="10,0,0,0"></local:PasswordBoxExt></DockPanel>

http://www.shuangfujiaoyu.com/news/8668.html

相关文章:

  • 网站官网域名要多少钱百度推广四川成都地区服务中心
  • 网站备案主体是百度网首页
  • 建站中企动力西安专业seo
  • 法律网站建设网上推广赚钱项目
  • 茂名建站价格万词霸屏百度推广seo
  • 个人网站设计欣赏网页制作学习
  • 企业型网站制作盐城seo排名
  • 青岛做网站的公司有哪些深圳网站制作哪家好
  • 自主研发app大概要多少钱郑州百度网站快速优化
  • 自己做网站要会什么关键词查询工具包括哪些
  • 济南网站制作设计公司百度识图网页版在线使用
  • 仿做唯品会网站企业网站开发制作
  • 对seo的理解甘肃搜索引擎网络优化
  • 珠宝设计网站网站首页不收录
  • 长春站建筑网络营销主要做些什么工作
  • 贵州茅台酒股份有限公司网站如何自己制作网站
  • 建设彩票网站需要多少投资网站推广策划方案
  • 打不开wordpress站点百度认证平台
  • 网络营销外包公司靠谱吗seo的含义
  • 黄冈市建设委员会网站网站服务器
  • 做网站的公司怎么推广清远头条新闻
  • 2018什么语言做网站比较好佛山网络推广公司
  • 网站备案申请书竞价推广sem
  • 南昌做网站电话优化什么
  • wordpress 屏蔽中文浏览器福州seo视频
  • 百度口碑网站很卡如何优化
  • 个人网站做重定向图片关键词快速上首页排名
  • 天津网站建设 企航互联深圳百度推广属于哪家公司
  • 东莞网站建设品牌优化方案官网电子版
  • 网站seo关键字沈阳cms模板建站