locked
extended banner ad design RRS feed

  • Question

  • i want it to only be the size of the button and not of the button and the list.

     i think it may be confusing to understand what i mean so please view link for demo of how it is....

     

    http://10.14.42.136/Silverlight/TestPage.html

    how can i make the silverlight plugin size only that of the button and still have the list appearing outside of the silverlight window. i have tried zindex and also isWindowless=false. none work.

    if i resize the silverlight plugin size down to 35x30 (the size of the button), then when i hover on the button it does not show the list.  it just crops it.....i dont want it like this....i want the list to be able to appear outside of the silverlight plugin...is this even possible????

    for example some flash banner ads be small....but when u hover over them they extend out over other html content. can this be done in silverlight?

    Friday, February 8, 2008 5:00 AM

Answers

  • Make sure you are running the Silverlight control in Windowless mode with a transparent background. Note that there is a significant performance hit to this if you are doing any serious animation. For an ad, though, it should be fine.

    The rest of the behavior will be dictated by how the div is set up. I suggest making it work in straight HTML first, then putting the Silverlight plugin in place, This will help you figure out if the issues are html or silverlight.

    Pete

    Saturday, February 9, 2008 6:10 PM

All replies

  • Well there is no stright Way to do this.. but you can perform with a little hack..

    actually this is what is been done in flash also..(if i am right .. i did this few years back)

    Create you plugin size of the sixe you want..

    then on the click event of your button expand the plugin till the length of your list height..

    because either you do these things in FLASH or Silver light..

    then inner contetns need a framework to work..

    and if your contetn size id 100px/100px and you plugin size is 50px/50px//

    so it is madatory that 50px/50px fromthe contetn wil hide...

    it is just like

    having a popup will 500px/500px and trying to show  data of 1024px/700px withoud using Scroll bars..

    you know this will never happen

    so try the hack it will work in the way you want it to work.

    "If this answer helps you then maek it as answered"

     

    Friday, February 8, 2008 6:55 AM
  • ive got it almost wokring now. the only bad thing is that it doesnt act as an overlay. instead when resizing it...it pushes any other content next to the silverhost further away to make room. see updated link above.

    Friday, February 8, 2008 8:57 AM
  •  

    every thing which comes under Silverlight

    it actually goes in to a DIV

    you can change style position: absolute, left:500px top:100px and z-index 10

    it will work

    "if this answer helps you then mark it as answered"

     

    Friday, February 8, 2008 10:23 AM
  • I have the component within a div.  on hover of the button i do:

                 HtmlDocument hdoc = HtmlPage.Document;
                hdoc.GetElementByID("SilverlightControl").SetProperty("width", 510);
                hdoc.GetElementByID("SilverlightControl").SetProperty("height", 600);

     and then the opposite on mouse leave.

    but it doesnt work. please check the updated link i have above.

    Friday, February 8, 2008 10:59 AM
  • Make sure you are running the Silverlight control in Windowless mode with a transparent background. Note that there is a significant performance hit to this if you are doing any serious animation. For an ad, though, it should be fine.

    The rest of the behavior will be dictated by how the div is set up. I suggest making it work in straight HTML first, then putting the Silverlight plugin in place, This will help you figure out if the issues are html or silverlight.

    Pete

    Saturday, February 9, 2008 6:10 PM
  • it is not working because your div contains height width property from a css class

    and CSS class properties always overrides the control properties

    so what you have to use

    control.style.width

    control.style.height

    this is a javascript code.. to change control's style values

    "If this helps you then mark it as answered"

     

    Tuesday, February 12, 2008 10:26 AM