I currently use'm developing a WPF application that Proprtigrid out of the library.
To display the names and descriptions in a language from an independent manor, I am using a covering class in which the necessary features are included as per the documents provided. Here is a short list
[LocalizedDisplayName ( "ServerConfig", typeof (Resources.Strings.Resources))] public class ServerConfigPropertyGrid {#region areas private ServerConfig serverConfig; #endregion #region properties [LocalizedCategory ( "VeinStoreCategory", typeof (Resources.Strings.Resources))] [LocalizedDisplayName ( "ActiveDirectoryPasswordDisplayName", typeof (Resources.Strings.Resources))] [LocalizedDescription ( "ActiveDirectoryPasswordDescription", typeof (resource. Strings. Resources))] [editors (typef (passwordadapter), typef (password editors)] public string LdapPassword {{return serverConfig.LdapPassword; } Set {serverConfig.LdapPassword = value; }} #endregion #region Builder Public ServerConfigPropertyGrid (ServerConfig serverConfig) {// store serverConfig this.serverConfig = serverConfig; } #endregion}
Now I want to use a custom editor for LdapPassword property am because it is a password and should not see it as plain text in the PropertyGrid. . ITypeEditor {: As I am just not a first requirement I do not
public class to come up with the implementation of an editor of such a project on Codeplex #region field property item_property item; Password box _password box; # Ndrian public framework element real estate editor (property eighth property item) {_propertyItem = propertyItem; _passwordBox = new password box (); _passwordBox.Password = (string) propertyItem.Value; _passwordBox.LostFocus + = OnLostFocus; Return _password box; } Private Zero OnLostFocus (Object Sender, RoutedEventArgs E) {// eBe prevented from bubbeling e.Handled = true; If (_passwordBox.Password.Equals ((string) _propertyItem.Value)!) {_propertyItem.Value = _passwordBox.Password; }}}
All that is needed is to add the EditorAttribute to the property accordingly available on Codeplex and all should be fine but PasswordEditor is not shown at all. The consortor is also not called, so I think there should be some problem with the editorial declaration.
I am currently using the Extended WPF Toolkit version 2.4.0 inside a project to compile it in .NET 4.5.1 Is configured for.
Any thoughts that can be wrong? The WPF application itself includes a plugin architecture that includes all classes and their dependencies at runtime. Loads up. It seems that there was some error in the search for Xgredi class and hence the default editor used within the default group was. So it was not a coding but a configuration mistake. Sorry to steal your time.
No comments:
Post a Comment