E
Edward Beach
Hello,
I'm implementing an application with C# and WIA scripting and I'm
trying to display a WIA Device object in a property grid. After some
searching it seems like I want to model my solution after this example
(http://msdn.microsoft.com/en-us/magazine/cc163804.aspx) that involves
implementing a TypeDescriptionProvider and registering it via
TypeDescriptor.AddProvider().
When I set my Device object as the SelectedObject in my property grid,
I trace the through my implementation of "public override
ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object
instance)" but the instance parameter is null. This is unfortunate
since I need the instance to make the following calls to the WIA
Device's properties to generate the displayed properties in the
TypeDescriptor.
Could anybody help me? Why would the instance be null? And what
could I do to fix it, or work around it?
Thanks!
I'm implementing an application with C# and WIA scripting and I'm
trying to display a WIA Device object in a property grid. After some
searching it seems like I want to model my solution after this example
(http://msdn.microsoft.com/en-us/magazine/cc163804.aspx) that involves
implementing a TypeDescriptionProvider and registering it via
TypeDescriptor.AddProvider().
When I set my Device object as the SelectedObject in my property grid,
I trace the through my implementation of "public override
ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object
instance)" but the instance parameter is null. This is unfortunate
since I need the instance to make the following calls to the WIA
Device's properties to generate the displayed properties in the
TypeDescriptor.
Could anybody help me? Why would the instance be null? And what
could I do to fix it, or work around it?
Thanks!