J
Jared
I'm working on a custom control in VS2005, and I'm experiencing a
problem using Image resources from the Resource Manager. My control
has a child collection, and each child has an Image property. My
solution has two projects, one for the control and one for the test
app using the control. I can successfully set and persist the Image
property, and all works fine at runtime and design-time.
However, *once I rebuild the control project* my control breaks in the
using project at design-time with the error "The control (my control)
has thrown an unhandled exception in the designer and has been
disabled". It references a line in my code where I access the Image
property of a child, and it appears the Image is no longer valid.
I do not have this problem if I set the Image property directly -- I
only have a problem when using a strongly-typed Image from the
Resource Manager.
I thought it might be a problem with disposing the Image objects, but
commenting that out didn't resolve the issue.
Does anyone have any tips for the correct usage of strongly-typed
Image resources in custom controls?
TIA
Jared
problem using Image resources from the Resource Manager. My control
has a child collection, and each child has an Image property. My
solution has two projects, one for the control and one for the test
app using the control. I can successfully set and persist the Image
property, and all works fine at runtime and design-time.
However, *once I rebuild the control project* my control breaks in the
using project at design-time with the error "The control (my control)
has thrown an unhandled exception in the designer and has been
disabled". It references a line in my code where I access the Image
property of a child, and it appears the Image is no longer valid.
I do not have this problem if I set the Image property directly -- I
only have a problem when using a strongly-typed Image from the
Resource Manager.
I thought it might be a problem with disposing the Image objects, but
commenting that out didn't resolve the issue.
Does anyone have any tips for the correct usage of strongly-typed
Image resources in custom controls?
TIA
Jared