You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Impossible to make the Visual Studio PropertyGrid use my custom FileNameEditor derived class #6553
Have you experienced this same bug with .NET Framework?:
No, it works perfectly with the .Net Framework
Problem description:
I want to use a custom FileNameEditor for a custom control property. I derived from FileNameEditor like so:
public class MyFileNameEditor : System.Windows.Forms.Design.FileNameEditor
{
protected override void InitializeDialog(OpenFileDialog openFileDialog)
{
base.InitializeDialog(openFileDialog);
openFileDialog.Filter = "My files (*.custom)|*.custom";
}
}
I applied it like so:
[Editor(typeof(MyFileNameEditor ), typeof(System.Drawing.Design.UITypeEditor))]
public string MyFileName
{
set [...]
get [...]
}
In the VS designer, when selecting the custom control, inside the PropertyGrid, the property will have no editor.
Note that if I use the stock FileNameEditor instead, it just works.
Activity