extended banner ad design
Last post 02-12-2008 10:26 AM by bluearc. 6 replies.
Sort Posts:
02-08-2008 5:00 AM
extended banner ad design

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?

luqman_hussain

Loading...
Joined on 01-31-2008
Posts 9
02-08-2008 6:55 AM
Re: extended banner ad design

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"

 

Ravi Kant Srivastava
(Application Developer)
Scope Technology
India/South Africa

bluearc

Loading...
Joined on 12-20-2007
India/South Africa
Posts 325
02-08-2008 8:57 AM
Re: extended banner ad design

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.

luqman_hussain

Loading...
Joined on 01-31-2008
Posts 9
02-08-2008 10:23 AM
Re: extended banner ad design

 

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"

 

Ravi Kant Srivastava
(Application Developer)
Scope Technology
India/South Africa

bluearc

Loading...
Joined on 12-20-2007
India/South Africa
Posts 325
02-08-2008 10:59 AM
Re: extended banner ad design

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.

luqman_hussain

Loading...
Joined on 01-31-2008
Posts 9
02-09-2008 6:10 PM
Marked as Answer
Re: extended banner ad design

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

If your question was answered, please mark the response as the answer.

Silverlight.net Moderator
MVP: Visual Developer - Client Application Development
POKE 53280,0 - My Blog

Psychlist1972

Loading...
Joined on 10-12-2004
Maryland, USA
Posts 801
02-12-2008 10:26 AM
Re: extended banner ad design

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"

 

Ravi Kant Srivastava
(Application Developer)
Scope Technology
India/South Africa

bluearc

Loading...
Joined on 12-20-2007
India/South Africa
Posts 325
Page view counter