locked
Transparent Windowless Rendering issue RRS feed

  • Question

  • I've been working with WPF/E for a couple weeks now and there's a rendering bug I have not been able to get past. I'm creating a windowless control that I want to be transparent over the other page elements.. for example:

                    new agHost("WpfeControlHost", // hostElementID (HTML element to put WPF/E control into)
                               "WpfeControl",     // ID of the WPF/E ActiveX control we create
                               "250",              // Width
                               "600",              // Height
                               "",            // Background color
                               null,               // SourceElement (name of script tag containing xaml)
                               "Xaml/MainPage.xaml",      // Source file
                               "true",            // IsWindowless
                               "30",               // MaxFrameRate
                               null                // OnError handler   
                              );


    This seems to be the best way to get a control to overlay other page elements and allow transparency. The only problem is that about half the time this loads it messes with the other elements on the page. It discolors text and images usually either pink or blue. Does anybody know how to avoid this rendering problem? When it does work it looks slick, but when it doesn't it sure looks bad.

    Thank you
    Thursday, February 1, 2007 1:27 AM

Answers

  • I haven't seen this problem, but I set the background color to #00000000 and make sure that <div> (or <span>) is marked as style="background-color: transparent" as well.
    Thursday, February 1, 2007 10:40 AM

All replies

  • I haven't seen this problem, but I set the background color to #00000000 and make sure that <div> (or <span>) is marked as style="background-color: transparent" as well.
    Thursday, February 1, 2007 10:40 AM
  • Thanks Shawn! Changing the control's background color to #00000000 did the trick. Since I made that change I have not seen the problem re-occur. Now I can demo this thing!
    Thursday, February 1, 2007 10:35 PM