当前位置: 首页>>代码示例>>C#>>正文


C# PasswordBox.SelectAll方法代码示例

本文整理汇总了C#中System.Windows.Controls.PasswordBox.SelectAll方法的典型用法代码示例。如果您正苦于以下问题:C# PasswordBox.SelectAll方法的具体用法?C# PasswordBox.SelectAll怎么用?C# PasswordBox.SelectAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Controls.PasswordBox的用法示例。


在下文中一共展示了PasswordBox.SelectAll方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: checkSetting

        bool checkSetting(bool result, PasswordBox passwordBox, string message)
        {
            if (!result) {
                MessageBox.Show(message, resources["Connect"] as string, MessageBoxButton.OK, MessageBoxImage.Warning);
                passwordBox.SelectAll();
                passwordBox.Focus();
            }

            return result;
        }
开发者ID:kevenme,项目名称:x-wall,代码行数:10,代码来源:MainWindow.xaml.cs

示例2: SetSelection

 private void SetSelection(PasswordBox passwordBox, int start, int length)
 {
     try
     {
         if (start < 0x0)
         {
             start = passwordBox.Password.Length;
         }
         passwordBox.GetType().GetMethod("Select", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(passwordBox, new object[] { start, length });
     }
     catch (Exception exception)
     {
         DebugLog.Assert(false, exception.Message);
         passwordBox.SelectAll();
     }
 }
开发者ID:QuocHuy7a10,项目名称:Arianrhod,代码行数:16,代码来源:LoginWindow.xaml.cs

示例3: bindTextBox

 public static void bindTextBox(PasswordBox passwordBox, string name)
 {
     passwordBox.Password = settings[name] as string;
     passwordBox.PasswordChanged += (sender, e) => {
         settings[name] = passwordBox.Password;
     };
     passwordBox.GotFocus += (sender, e) => {
         passwordBox.SelectAll();
     };
 }
开发者ID:kevenme,项目名称:x-wall,代码行数:10,代码来源:UIBinding.cs

示例4: bindTextBox

 public static void bindTextBox(PasswordBox passwordBox, string name) {
     passwordBox.Password = settings[name] as string;
     passwordBox.PasswordChanged += (sender, e) => {
         var password = passwordBox.Password;
         if (settings[name] as string != password) {
             settings[name] = password;
         }
     };
     settings.PropertyChanged += (sender, e) => {
         if (e.PropertyName == name) {
             var password = settings[name] as string;
             if (passwordBox.Password != password) {
                 passwordBox.Password = password;
             }
         }
     };
     passwordBox.GotFocus += (sender, e) => {
         passwordBox.SelectAll();
     };
 }
开发者ID:coolinc,项目名称:XWall,代码行数:20,代码来源:UIBinding.cs


注:本文中的System.Windows.Controls.PasswordBox.SelectAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。