SmartPartPlaceHolder Transparency

Topics: CAB & Smart Client Software Factory
Aug 24, 2005 at 12:01 PM
originally posted by: DLorenz

Right now, the main form of the application has an image as a background. I'd like for that image to appear through all the smart parts I am adding to the form. However, the SmartPartPalceHolder apparently does not support Transparecy, so it always goes over the top of the background. Is there a reason why this is necessary or is there a way to fix it? Thanks.
Aug 25, 2005 at 6:33 AM
originally posted by: DLorenz

Well, the SmartPartPlaceHolder (along with the DeckWorkspace) both inherit from Control. I changed this to UserControl, and then transparency is allowed. So far, I haven't seen any side effects to changing this.
Sep 7, 2005 at 5:25 AM
originally posted by: Andrew_S

There is no need to derive from UserControl. The SmartPartPlaceHolder and presumably any other custom derived control in cab just needs to be changed to set the SupportsTransparentBackColor control style to true. i.e. this.SetStyle(ControlStyles.SupportTransparentBackColor, true) in the ctor.