Posted 21 Nov 2011
Link to this post
thanks for your support. I had a similar Solution (except the EditorInitialized-Part. Your documentation of the PropertyGrid isn´t very extensive. No word about your BuiltIn-Editors, only how to customize one of it) - with the same problem:
The Editor-Customizing depends on the Property-Name - or at least on the Property-Type. That name is displayed in the PropertyGrid. In a multilanguage environment the name can change - even the name can be more than one time stored in the ProperyStore (in another category). It would be very helpful, if the PropertyStoreItem has a unique identificationfield (or a simple Tag-Field), which can accessed by the PropertyGridItemEditorInitializedEventArgs/PropertyGridEditorRequiredEventArgs-Objects. Simple example:
store.Add(new PropertyStoreItem(typeof(string), "CardReaderType", "Legic Advant", "Type of CardReader", "Reader 1", false, "TagOnlyLegic"));
store.Add(new PropertyStoreItem(typeof(string), "CardReaderType", "Mifare DESfire", "Type of CardReader", "Reader 2", false, "TagOnlyMifare"));
The last (not existing) parameter is the unique identifier. Of course, "CardReaderType" can be made unique ("CardReaderType 1", "CardReaderType 2") but in German the name is complete different ("Kartenleser-Typ"). An internal identifier is a better choice.
My goal is to develop one generic configurationtool for all of our products. I am tired of programming it every time :-) I have already written a WPF-Programm with RadGridViews, but it performs not very well and startup-time on 1 Ghz SingleCore machines is slow. I think, WinForms is in that case the better choice. The PropertyStore-Feature comes at the right time.