C# 我在哪里可以找到 WPF 中的免费蒙版 TextBox?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/481059/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where can I find a free masked TextBox in WPF?
提问by Victor Rodrigues
Do you know any freely available WPF component for using masks (regex) in textbox?
您知道在文本框中使用掩码(正则表达式)的任何免费可用的 WPF 组件吗?
采纳答案by GEOCHET
I think you will find what you need in this control library: http://www.codeplex.com/WPFDeveloperTools
我想你会在这个控件库中找到你需要的东西:http: //www.codeplex.com/WPFDeveloperTools
Look for 'FilteredTextBox' amongst all the other useful controls. I don't think it does regex, but it should be able to filter just about everything you need, and since you will have the source, you should find it easy to enhance.
在所有其他有用的控件中寻找“FilteredTextBox”。我不认为它做正则表达式,但它应该能够过滤几乎所有你需要的东西,因为你有源,你应该发现它很容易增强。
As a bonus, it is free and open source on CodePlex.
作为奖励,它在 CodePlex 上是免费和开源的。
You can also find a nice blog post about how to go about implementing this yourself here: http://marlongrech.wordpress.com/2007/10/28/masked-textbox/
您还可以在此处找到有关如何自己实施此功能的不错的博客文章:http: //marlongrech.wordpress.com/2007/10/28/masked-textbox/
回答by Pat
Extended WPF Toolkithas a MaskedTextBoxsimilar to the one that was in WinForms. As with the old one, this doesn't actually support RegExes, but has a subset of useful masks.
扩展 WPF 工具包有一个类似于 WinForms 中的MaskedTextBox。与旧的一样,它实际上并不支持 RegEx,但有一个有用的掩码子集。
Oh, and it's on NuGet, which is nice.
哦,它在NuGet 上,这很好。
回答by Matt Zappitello
Coding Monkhas a good TextboxEditMask Behavior. You can either download the source code or just use the dlls.
Coding Monk有一个很好的 TextboxEditMask Behavior。您可以下载源代码或仅使用 dll。