I have successfully managed to implement a "bindable" PasswordBox in WPF (http://www.wpftutorial.net/PasswordBox.html), and used it in a WPF DataGrid.
I really need this feature in the XamDataGrid as well.
I have found several posts which mentions the XamMaskedEditor (without providing any code). These posts are fairly old, and I was wondering if you had implemented such a feature in the current release of NetAdvantage?
Hello Andrew,
I'm not that familiar with WPF yet, so I'm not sure if I understand your last answer.
Is it possible that you could modify my sample for me?
I see a few more problems. First, the template isn't being applied to the ControlHostEditor. That is because another attribute seems to have been lost when you converted/updated the project - the ThemeInfo.
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
Another issue is that you are using an UnboundField but that requires then that you set the Binding or BindingPath. Since Text is a property of your data item you should just use Field.
Lastly, your PwnHelper assumes that order of the Binding/Bind properties is such that Bind would be set first and then Binding. However WPF is not doing that (at least when I run it); when Binding is changed the Bind is still false so you don't set the Password of the PasswordBox. When the Bind is subsequently set to true you only hook/unhook the events but you don't actually update the Password of the PasswordBox.
I tried adding the attributes, but the column/field doesn't show anything.
I haven't changed anything else. It really puzzles me...
I'm not sure how it happened but the assemblyinfo.cs for the project containing the ControlHostEditor seems to be missing all the xmlns attributes. You can just add the attributes. e.g.
[assembly: XmlnsPrefix("http://infragistics.com/Samples", "igSamples")] [assembly: XmlnsDefinition("http://infragistics.com/Samples", "Infragistics.Windows.Samples")]
[assembly: XmlnsDefinition("http://infragistics.com/Samples", "Infragistics.Windows.Samples")]
I have attached a sample containing my PasswordBox-control.
Looking forward to hearing from you.