1. <legend id='uiKFG'><style id='uiKFG'><dir id='uiKFG'><q id='uiKFG'></q></dir></style></legend>
    1. <small id='uiKFG'></small><noframes id='uiKFG'>

        <bdo id='uiKFG'></bdo><ul id='uiKFG'></ul>
      <i id='uiKFG'><tr id='uiKFG'><dt id='uiKFG'><q id='uiKFG'><span id='uiKFG'><b id='uiKFG'><form id='uiKFG'><ins id='uiKFG'></ins><ul id='uiKFG'></ul><sub id='uiKFG'></sub></form><legend id='uiKFG'></legend><bdo id='uiKFG'><pre id='uiKFG'><center id='uiKFG'></center></pre></bdo></b><th id='uiKFG'></th></span></q></dt></tr></i><div id='uiKFG'><tfoot id='uiKFG'></tfoot><dl id='uiKFG'><fieldset id='uiKFG'></fieldset></dl></div>
    2. <tfoot id='uiKFG'></tfoot>

      如何将密码框用作文本框?

      How to use PasswordBox as TextBox?(如何将密码框用作文本框?)
        <tfoot id='TppMr'></tfoot>
      1. <i id='TppMr'><tr id='TppMr'><dt id='TppMr'><q id='TppMr'><span id='TppMr'><b id='TppMr'><form id='TppMr'><ins id='TppMr'></ins><ul id='TppMr'></ul><sub id='TppMr'></sub></form><legend id='TppMr'></legend><bdo id='TppMr'><pre id='TppMr'><center id='TppMr'></center></pre></bdo></b><th id='TppMr'></th></span></q></dt></tr></i><div id='TppMr'><tfoot id='TppMr'></tfoot><dl id='TppMr'><fieldset id='TppMr'></fieldset></dl></div>

        <small id='TppMr'></small><noframes id='TppMr'>

            <tbody id='TppMr'></tbody>

            <legend id='TppMr'><style id='TppMr'><dir id='TppMr'><q id='TppMr'></q></dir></style></legend>
              <bdo id='TppMr'></bdo><ul id='TppMr'></ul>

              • 本文介绍了如何将密码框用作文本框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个PasswordBox,我需要将此控件even 用作TextBox.我需要显示普通文本而不是典型的黑点

                I have a PasswordBox and I need to use this control even as a TextBox. I need to display normal text and not the typical black dots

                有没有属性可以做到这一点?谢谢.

                Is there a property to do this? Thanks.

                推荐答案

                这是你的答案:

                1. 使用文本框
                2. 当你想要文本被屏蔽时设置TextBox.UseSystemPasswordChar = true;
                3. 当你想看文本时设置TextBox.UseSystemPasswordChar = false;
                4. 利润

                例子:

                private void checkBox1_CheckedChanged(object sender, EventArgs e)
                {
                    if (checkBox1.Checked == true)
                    {
                        TextBox.UseSystemPasswordChar = true;
                    }
                    else 
                    {
                        TextBox.UseSystemPasswordChar = false;
                    }
                }
                

                黑点当你想要它们时,单词当你不需要时.您可以使用您想要的任何触发器/逻辑来打开和关闭,但这样您只使用一个控件并获得您指定所需的所有功能.

                Black dots when you want them, words when you don't. You can use what ever trigger/logic you want for the turning on and off but this way you are only using one control and get all the functionality that you specified you needed.

                这篇关于如何将密码框用作文本框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                How to keep the Text of a Read only TextBox after PostBack()?(PostBack()之后如何保留只读文本框的文本?)
                Winforms Textbox - Using Ctrl-Backspace to Delete Whole Word(Winforms 文本框 - 使用 Ctrl-Backspace 删除整个单词)
                C# - Add button click events using code(C# - 使用代码添加按钮单击事件)
                Multi-color TextBox C#(多色文本框 C#)
                How can i set the caret position to a specific index in passwordbox in WPF(如何将插入符号位置设置为 WPF 密码框中的特定索引)
                C# Numeric Only TextBox Control(C# 纯数字文本框控件)

                    <tbody id='JyAmm'></tbody>

                      <bdo id='JyAmm'></bdo><ul id='JyAmm'></ul>
                      <legend id='JyAmm'><style id='JyAmm'><dir id='JyAmm'><q id='JyAmm'></q></dir></style></legend>
                    • <i id='JyAmm'><tr id='JyAmm'><dt id='JyAmm'><q id='JyAmm'><span id='JyAmm'><b id='JyAmm'><form id='JyAmm'><ins id='JyAmm'></ins><ul id='JyAmm'></ul><sub id='JyAmm'></sub></form><legend id='JyAmm'></legend><bdo id='JyAmm'><pre id='JyAmm'><center id='JyAmm'></center></pre></bdo></b><th id='JyAmm'></th></span></q></dt></tr></i><div id='JyAmm'><tfoot id='JyAmm'></tfoot><dl id='JyAmm'><fieldset id='JyAmm'></fieldset></dl></div>

                    • <small id='JyAmm'></small><noframes id='JyAmm'>

                      <tfoot id='JyAmm'></tfoot>