I'm currently trying to use the provided PasswordEditor within my application (.NET 4.5.1, version 2.4.0 of the Toolkit library) but with no success. I'm using a wrapper class to hold the actual configuration settings. The wrapper contains all the annotations like Category, DisplayName and Description but with my own implementations to use resource files as string repositories. These attributes are currently working and showing fine within the PropertyGrid. For some reason the PasswordEditor is not shown in the PropertyGrid although I'm using the EditorAttributed as shown in the documentation.
[LocalizedDisplayName("ServerConfig", typeof(Resources.Strings.Resources))]
public class ServerConfigPropertyGrid
{
#region fields
private ServerConfig serverConfig;
#endregion
#region properties
[LocalizedCategory("VeinStoreCategory", typeof(Resources.Strings.Resources))]
[LocalizedDisplayName("ActiveDirectoryPasswordDisplayName", typeof(Resources.Strings.Resources))]
[LocalizedDescription("ActiveDirectoryPasswordDescription", typeof(Resources.Strings.Resources))]
[Editor(typeof(PasswordEditor), typeof(PasswordEditor))]
public string LdapPassword
{
get { return serverConfig.LdapPassword; }
set { serverConfig.LdapPassword = value; }
}
#endregion
#region constructor
public ServerConfigPropertyGrid(ServerConfig serverConfig)
{
// store serverConfig
this.serverConfig = serverConfig;
}
#endregion
}
This is actually a shortened listing. Any idea what could cause this behavior