Strange Problem - IsNew, IsDirty, IsSavable

Strange Problem - IsNew, IsDirty, IsSavable

Old forum URL: forums.lhotka.net/forums/t/4121.aspx


smark posted on Friday, January 04, 2008

Databinding is good in WPF; however, one of my objects has a password box that, I just discovered, cannot be databound for good reasons. Trouble is, it is not raising any event that will trigger IsNew, IsDirty, IsSavable etc., the way this properties have been bound to those checkboxes in Rock's ProjectTracker WPF. Without the Password box, it works like a charm. Any workarounds? Otherwise the whole databinding facility is lost (I have about 16 properties) just because of a Password box. Thanks.

smark replied on Tuesday, January 08, 2008

Okay, let me put this differently. If you have a property in your BO which cannot be databound (PasswordBox WPF), what options does one have to implement n-Level undo? A Memento perhaps? I wonder if others have come across this. I am not sure, but it looks like if a (read-write) property cannot be databound, then the object as a whole is beyond databinding, if the said read-write property participates integrally in all the validation and authorization rules. Manual implementation then?

ajj3085 replied on Tuesday, January 08, 2008

Have you tried creating a textbox that displays * for each character, but is otherwise a standard text box?

smark replied on Wednesday, January 09, 2008

You mean derive from the standard TextBox or use one of the available properties of the TextBox? I'll need to look into this. Thanks for the clue. DataBinding is so useful otherwise.

Copyright (c) Marimer LLC