As per my previous question, Make properties available for data binding through some kind of interface in .NET?, I managed, with the help of @Marc Gravell that by implementing the interface ICustomTypeDescriptor I can provide the form designer with custom properties that may or may not actually be visible on the component in question as ...
I'm trying to enable user of my application to add their own custom properties to objects. Classes which the user can add properties too implement the interface IUserPropertyHost, which is shown below. UserPropertyHostType is an enumeration that identifies a specific group of custom properties to apply to the object.
public interface IU...
I'm displaying a list of objects in a DataGridView. Everything was working fine. Columns were automagicaly added to the DataGridView based on the properties of the objects.
Now I changed the class I'm displaying in the grid to implement ICustomTypeDescriptor. But now the grid now no longer shows any columns or rows when I set it's DataS...
Can anyone provide a better example on using ITypeDescriptorFilterService interface than the MSDN ColorCycleButton ??
http://msdn.microsoft.com/en-us/library/system.componentmodel.design.itypedescriptorfilterservice.aspx
...
Given the fact that I have a fully dynamic object model, that is, I have no concrete classes defined anywhere in code, but I still want to be able to create WCF DataContracts for them so I can use them in operations. How can I achieve this?
My concrete class "Entity" implements ICustomTypeDescriptor which is used to present the various ...
I'm using a PropertyGrid in an application I am writing to allow users to view and sometimes edit instances of my objects. Sometimes the user may have a file open in read/write mode where they can make changes to the file through the property grid. In other cases they may have a file open in read only mode, and should not be able to make...
I have a class which implements ICustomTypeDescriptor, and is viewed and edited by the user in a PropertyGrid. My class also has a IsReadOnly property which determines if the user will be able to save their changes later. I don't want to allow the user to make changes if they will not be able to save. So if IsReadOnly is true I want to o...
I'm playing with PropertyDescriptor and ICustomTypeDescriptor (still) trying to bind a WPF DataGrid to an object, for which the data is stored in a Dictionary.
Since if you pass WPF DataGrid a list of Dictionary objects it will auto generate columns based on the public properties of a dictionary (Comparer, Count, Keys and Values) my Per...
In a test project I've managed to AutoGenerate WPF DataGrid columns in the following scenario, where the data is stored in a Dictionary and binding is performed via PropertyDescriptors:
public class People:List<Person>{
...
}
public class Person:Dictionary<string,string>,INotifyPropertyChanged,ICustomTypeDescriptor
{
}
The probl...
I'm playing around with an idea(never played with TypeDescriptors before), and managed to get it to work nicely. But I'm concerned about some "best practice" decisions I made during my little experiment.
I use a CustomTypeDescriptor, that receives an event from its PropertyDescriptors indicating that the values are changing or being que...