Showing posts with label dropshadow. Show all posts
Showing posts with label dropshadow. Show all posts

Monday, March 26, 2012

dropshadowextender showing up awkward

Hello,

Having an issue with the dropshadowextender...in Firefox, it's working fine, but when using IE, the dropshadow is appearing above the panel, instead of below it. By that, I mean the shadow is at the very top of the panel, instead of the very bottom. Here's a live example so you can see what I am talking about:

head to: http://moglme.com/viewList.aspx?lid=195 and then click on any of the "Shop this store" links on the right hand side. the shadow starts how it's supposed to be, but moves to the top shortly after. any help would be appreciated :)

anyone? this is a issue that we need to get solved immediately, and i'm having trouble figuring out what is wrong


Hi,

I have looked at this in both IE version 7.0 and Firefox version 2.0.0.4 and the web page displays exactly the same in both. (The shadow is in the correct place.)

What version of IE are you using?

Cheers,

Matt


hello,

after about a week or 2, without changing anything in the code related to the drop shadow, it started behaving as intended. it's like it just magically started to work, don't know how it happened though

DropShadowExtender not attached to its panel

HELP PLEASE!!! I have put a DropShadowExtender on my login panel but when I run it, the dropshadow is completely detached from the panel itself! It is the correct size, shape, opacity, but the shadow is appearing a few inches down and to the right of the panel.

I've been banging on this for a WEEK and my head's about to explode.

1<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
2 <asp:ScriptManager ID="sm" runat="server" EnablePartialRendering="true" />
3 <asp:Panel ID="pnlLogin" runat="server" CssClass="LoginShadow">
4 <div style="padding:10px ; z-index:115">
5 User Name: <asp:TextBox ID="UserName" runat="server"></asp:TextBox><br />
6 Password: <asp:TextBox ID="Password" runat="server"></asp:TextBox><br />
7 <hr />
8
9 <asp:Button ID="LoginButton" runat="server" BackColor="#FFFBFF" BorderColor="#CCCCCC"10 BorderStyle="Solid" BorderWidth="1px" CommandName="Login" Font-Names="Verdana"11 Font-Size="0.8em" ForeColor="#284775" Text="Log In" ValidationGroup="Login"
12 OnClick="LoginButton2_Click">
13 </asp:Button>
14 </div>
15 </asp:Panel>
16 <ajaxToolkit:DropShadowExtender ID="dse1" runat="server"17 TargetControlID="pnlLogin"
18 Width="5"19 Rounded="true"20 Radius="6"21 Opacity=".7"22 TrackPosition="true"></ajaxToolkit:DropShadowExtender>
23</asp:Content>
What happens if you remove the HR tag? (Which forces line breaks...)

Saturday, March 24, 2012

DropShadow visible when PopupControl is not...

So I'm trying to attach a DropShadowExtender to the same panel that is already attached to a PopupControlExtender. There are two issues that arise.

First, the shadow is always visible on the page even when the control is hidden by the PopupControlExtender.

Second, the shadow displays where the control would be located in its original position if all atlas code is removed from the page. When you first click on the control that causes the PopupControl to display the shadow jumps to where the control is now visible, as specified by the properties of the PopupControlExtender (offset some x and some y a certain direction from whatever control).

Can I modify the DropShadowExtender in some way to hide itself? Or do I have to try and create a new hybrid control that incoporates both the DropShadow and the Popup behavior together?

Have you tried setting TrackPosition="true" on the DropShadow?

Yes, I have the TrackPosition="true". Here, look at these pictures and maybe they will give you a better idea of what is happening.

This is how the page looks when it first loads:http://i48.photobucket.com/albums/f242/Braigo64/Popup_1.jpg
The popup is hidden but the dropshadow attached to it shows up.

This is how the page looks when you click the information icon:http://i48.photobucket.com/albums/f242/Braigo64/Popup_2.jpg
The popup appears and the dropshadow moves to the proper place.

This is how the page looks when the popup is dismissed:http://i48.photobucket.com/albums/f242/Braigo64/Popup_3.jpg
The popup is hidden again, but the dropshadow still shows up.

The question is, how can I hide the dropshadow? Is there a simple fix? Or do I have to create a new controlextender that incorporates both the popup behavior AND the dropshadow behavior on a control?


Thanks for the pictures - good demonstration of the problem!

I've played around with this a bit just now and find that adding the following lines to the end of this.setShadow in DropShadowBehavior.js fixes the problem for me when I try to simulate your scenario:

if (_shadowDiv) { _shadowDiv.get_style().visibility = this.control.element.style.visibility;}

The change simply makes the shadow DIV's visibility match that of the control it's shadowing.

Can you please give this a try and let me know? If it works for you, too, then I'll open a work item to make a change like this to DropShadow permanent.


Thank you. That indeed corrected the problem. This should definitely be part of the default behavior of the DropShadow.

The only thing is the shadow slightly lags behind the popup item when vanishing, but only for a split second. It's a minor glitch I can overlook for now. :P

Thanks again.


Now work item 709.

This has been checked in for the next Toolkit release. Check-in notes:

DropShadow now sets the visibility style of the shadow to match that of the TargetControlID. This allows it to auto-hide when hooked up to, for example, PopupControl. The default timer interval for the TrackPositionDelay mode was decreased from 100ms to 50ms to improve the default experience (note that the default delay can be changed via a script call to set_TrackPositionDelay if necessary). The PopupControl sample has been modified to include a DropShadow for the popups.


Is this in the June release (60626)?

I am using this release and still have this problem.

Andy.


It appears first in thenew 60731 release.

Cool, you lot really are on the ball!

Keep up the good work.

Andy.


Hey, ignorant question here, since I truly don't 'get' how the rounded corner extender actually does its job... but is there anyway to make sure that a rounded box drops a rounded shadow?
It will by default if both extenders are used.
I must've grabbed an older dll, then, b/c it doesn't on my machine. I'll try w/ the the latest one advertised above.

Ok, so I tried it with the latest release and the 'default' made a square shadow that's black. furthermore, the background color of the Div (set through a id-based selector in the css) only shows up where the rounded corners were, the rest of it were apprently transparent, as the shadow was showing through and where the shadow is indented on the left, it showed the background of the page itself.

I set some of the properties, namely opacity and rounded, and I got a lighter gray, rounded-corner dropshadow (as expected from your suggestions)... and still my div was transparent except where the rounded corner part is.

Interestingly enough, I did some mucking around and it appears that the thing that makes it break like that is setting the style (in this case height, width, and background-color) using the id-based selector. Haven't investigated the extender's code yet to see why that is, but when I moved the style info to a class in the same css instead of in the id-based selector, it worked fine. If I had to guess, I'd say that the controls probably look to see what the current style of the control is using the class(?). As good a guess as any until I ahve time to dig in deeper.


Yes - we need to get better about this. It's a problem with the DOM in general with computing "current" styles. We're not entirely consistant here.

Basically the problem is that

element.style.width

Will return a value for:

<div style="width:200px"/>

but not always for

.myStyle {

width:200px;

}

<div class="myStyle"/>

Dropshadow too low

I am have a problem with the dropshadow extender placing the shadow too low on the page. I have a series of asp panels on a page that are targets of dropshadow extenders, for some reason all of the shadow are being postioned too low on the page. It seem that the top shadow is is getting a sytle element with a top value that is placing it too low on the page, and then all of the other dropshadow extender panels are offset by the same value.

Can anyone shed some light as to how the dropshadow extender determines its top position? I assmed that I would be with regard to the posotion of the target panel, but that doesn't seem to be the case here.

Thanks.

Any help welcome!

Hi Audley9,

This kind of issues is usually caused by the css settings. Here is my sample that you can reference to. Please compare it with yours.

<%@. Page Language="C#" %><%@. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"> <title>Untitled Page</title> <style type="text/css">.overall { left: 10px; top: 10px; ; height: 500px; background-color: Silver; } .above { position: absolute; margin-left: 50px; margin-top: 50px; z-index: 2; } .aboveinside { width:300px; background-color:#5377A9; color:white; font-weight:bold; } .below { margin-top: 10px; left: 0px; width: 300px; height: 200px; z-index: 1; background-color: Blue; } </style></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div class="overall"> <asp:Panel ID="above" runat="server" CssClass="aboveinside"> <div style="padding:10px"> Here's some text in a box. </div> </asp:Panel> <cc1:DropShadowExtender ID="DropShadowExtender1" runat="server" TargetControlID="above" Width="5" Opacity=".5" Rounded="true" TrackPosition="true" Radius="6"> </cc1:DropShadowExtender> <div class="below">This is some text underneath... This is some text underneath... This is some text underneath... This is some text underneath... This is some text underneath... This is some text underneath... This is some text underneath... This is some text underneath... This is some text underneath... This is some text underneath... </div> </div> </form></body></html>

I hope this help.

Best regards,

Jonathan


Thnaks for Answering!

I had solved this issue already but forgot to come back to this post. Whit my situation, I had a series of nested "Div' Tags that had "Postion: relative", set to the divs. I was trying to acomplish a rather complex layout using Css, which I was not able to acomplish (there were other issue besides this one), so I have had to intermingle css with table layout.

Thanks for the help!

DropShadow Style for ModalPopupExtender

Hello,

Is there a way to change the DropShadow style on the ModalPopupExtender? Currently it is showing up as black. I would like to change the dropshadow to a different color and maybe increase the size of the dropshadow if it is possible.

Thanks!

well, i found that i can apply the dropshadowExtender to the ModalPopupExtender, which takes care of the dropshadow (i wanted it to be slightly opaque).

For those interested:

<asp:HyperLinkID="LinkButton1"runat="server"Text="modal"navigateurl="#"/><asp:PanelID="Panel1"runat="server"Style="display: none"CssClass="modalPopup"><divid="blah">

test

<pstyle="text-align: center;"><asp:ButtonID="OkButton"runat="server"Text="OK"/><asp:ButtonID="CancelButton"runat="server"Text="Cancel"/><br/></p></div></asp:Panel><ajaxToolkit:ModalPopupExtenderID="MPE"runat="server"TargetControlID="LinkButton1"PopupControlID="Panel1"BackgroundCssClass="modalBackground"DropShadow="false"OkControlID="OkButton"OnOkScript="onOk()"CancelControlID="CancelButton"PopupDragHandleControlID=""X="180"Y="400"behaviorid="modalBehavior"/><ajaxToolkit:DropShadowExtenderID="dse"runat="server"TargetControlID="Panel1"Opacity=".4"Rounded="false"TrackPosition="true"/>


well, i found that i can apply the dropshadowExtender to the ModalPopupExtender, which takes care of the dropshadow (i wanted it to be slightly opaque).

For those interested:

<asp:HyperLinkID="LinkButton1"runat="server"Text="modal"navigateurl="#"/><asp:PanelID="Panel1"runat="server"Style="display: none"CssClass="modalPopup"><divid="blah">

test

<pstyle="text-align: center;"><asp:ButtonID="OkButton"runat="server"Text="OK"/><asp:ButtonID="CancelButton"runat="server"Text="Cancel"/><br/></p></div></asp:Panel><ajaxToolkit:ModalPopupExtenderID="MPE"runat="server"TargetControlID="LinkButton1"PopupControlID="Panel1"BackgroundCssClass="modalBackground"DropShadow="false"OkControlID="OkButton"OnOkScript="onOk()"CancelControlID="CancelButton"PopupDragHandleControlID=""X="180"Y="400"behaviorid="modalBehavior"/><ajaxToolkit:DropShadowExtenderID="dse"runat="server"TargetControlID="Panel1"Opacity=".4"Rounded="false"TrackPosition="true"/>


well, i found that i can apply the dropshadowExtender to the ModalPopupExtender, which takes care of the dropshadow (i wanted it to be slightly opaque).

For those interested:

<asp:HyperLinkID="LinkButton1"runat="server"Text="modal"navigateurl="#"/><asp:PanelID="Panel1"runat="server"Style="display: none"CssClass="modalPopup"><divid="blah">

test

<pstyle="text-align: center;"><asp:ButtonID="OkButton"runat="server"Text="OK"/><asp:ButtonID="CancelButton"runat="server"Text="Cancel"/><br/></p></div></asp:Panel><ajaxToolkit:ModalPopupExtenderID="MPE"runat="server"TargetControlID="LinkButton1"PopupControlID="Panel1"BackgroundCssClass="modalBackground"DropShadow="false"OkControlID="OkButton"OnOkScript="onOk()"CancelControlID="CancelButton"PopupDragHandleControlID=""X="180"Y="400"behaviorid="modalBehavior"/><ajaxToolkit:DropShadowExtenderID="dse"runat="server"TargetControlID="Panel1"Opacity=".4"Rounded="false"TrackPosition="true"/>


eek! sorry.. stupid connect at work made it look like the post didnt go thru =/

DropShadow Resize problem with the Shadow remaining on table resize.

The code below is just a sample I added to the DropShadow and I pretty sure this is a bug.

What happens when load up is fine. When you move items from the left listbox to the right listbox it seems fine.

EXCEPT, when one listbox becomes empty, the listbox shrinks, hence the table shrinks and then your left with this big black shadow on the right that goes up to the table. That is the shadow has not resized with the table.

If I addWidth="100%" to the Panel yes it works but then my screen design is not what I want I have this massive table on the screen. It's the solution I'm forced to use now.

<divclass="demoarea">

<divclass="demoheading">DropShadow Demonstration</div><asp:PanelID="Panel1"runat="server"CssClass="dropShadowPanel"Width="100%"><divstyle="padding:10px">

<tableborder="2"width="100%">

<tr>

<tdcolspan="3"align=center> </td>

</

tr>

<

tr><td>

<asp:ListBoxRows="20"SelectionMode="Multiple"ID="lbListLeft"runat="server"><asp:ListItem>Somewhere RSL Club, 555 Something St, Somewhere</asp:ListItem><asp:ListItem>20</asp:ListItem>

<asp:ListItem>D</asp:ListItem></asp:ListBox><br/></td><td><NOBR><inputvalue="Add >>" type="button"BR></NOBR><NOBR><inputvalue="Add <<" type="button"BR></NOBR><NOBR><inputvalue="Add All >>" type="button"BR></NOBR><NOBR><inputvalue="Add All <<" type="button"BR></NOBR></td><td>

<br/><asp:ListBoxRows="20"SelectionMode="Multiple"ID="lbListRight"runat="server"><asp:ListItem> RSL Club, 154 Somewhere Pde, Somewhere</asp:ListItem><asp:ListItem>2</asp:ListItem><asp:ListItem>3</asp:ListItem>

</asp:ListBox></td>

</

tr>

</

table>

Did you set "TrackPosition='true'" on the DropShadowProperties?


Yes I haveTrackPosition="true"as it came from the example.

Here's the complete code in a master page. YOu'll notice that once you move all items to one listbox the table shrinks I have mentioned. I've done some slight changing to the html but this content page should work standalone. Unless you tweak the Content Placer then you'll have to tweak the javascript.

<%

@.PageLanguage="C#"MasterPageFile="~/Site.master"AutoEventWireup="true"CodeFile="DropShadow.aspx.cs"Inherits="DropShadow_DropShadow"Title="DropShadow Sample" %>

<%

@.RegisterAssembly="AtlasControlToolkit"Namespace="AtlasControlToolkit"TagPrefix="atlasToolkit" %>

<

asp:ContentID="Content1"ContentPlaceHolderID="MiddleContent"Runat="Server"><atlas:ScriptManagerid="ScriptManager"EnablePartialRendering="true"runat="Server"/><divclass="demoarea"><asp:PanelID="Panel1"runat="server"CssClass="dropShadowPanel"><divstyle="padding:10px">

<

tableborder="0"width="100%">

<tr><td><tableborder=0width="100%">

<tr><tdalign="right"><asp:ListBoxRows="20"SelectionMode="Multiple"ID="lbListLeft"runat="server"><asp:ListItem>Kogarah RSL Club, 254 Railway Pde, Kogarah</asp:ListItem><asp:ListItem>20</asp:ListItem><asp:ListItem>30</asp:ListItem><asp:ListItem>40</asp:ListItem><asp:ListItem>A</asp:ListItem><asp:ListItem>B</asp:ListItem><asp:ListItem>C</asp:ListItem><asp:ListItem>D</asp:ListItem></asp:ListBox></td></tr></table><br/><br/></td><td><NOBR><inputvalue="Add >>"onclick="moveDualList( this.form.ctl00$MiddleContent$lbListLeft, this.form.ctl00$MiddleContent$lbListRight, false );"type="button"style="width:90"><BR></NOBR><NOBR><inputvalue="Add <<"onclick="moveDualList( this.form.ctl00$MiddleContent$lbListRight, this.form.ctl00$MiddleContent$lbListLeft, false );"type="button"style="width:90"><BR></NOBR><NOBR><inputvalue="Add All >>"onclick="moveDualList( this.form.ctl00$MiddleContent$lbListLeft, this.form.ctl00$MiddleContent$lbListRight, true );"type="button"style="width:90"><BR></NOBR><NOBR><inputvalue="Add All <<"onclick="moveDualList( this.form.ctl00$MiddleContent$lbListRight, this.form.ctl00$MiddleContent$lbListLeft, true );"type="button"style="width:90"><BR></NOBR></td><td>

<br/>

<br/><asp:ListBoxRows="20"SelectionMode="Multiple"ID="lbListRight"runat="server"><asp:ListItem> RSL Club, 154 Railway Pde, Kogarah</asp:ListItem><asp:ListItem>2</asp:ListItem><asp:ListItem>3</asp:ListItem><asp:ListItem>4</asp:ListItem><asp:ListItem>5</asp:ListItem><asp:ListItem>D</asp:ListItem><asp:ListItem>G</asp:ListItem><asp:ListItem>K</asp:ListItem><asp:ListItem>Z</asp:ListItem><asp:ListItem>55</asp:ListItem></asp:ListBox></td>

</

tr>

<

tr><tdcolspan=3align=center><asp:ButtonID="btnSave"Text="Save"runat=server/></td></tr>

<

tr><tdcolspan=3>

</

td></tr>

</

table>

<

br/><br/><hr/><p><asp:PanelID="CollapseHeader"runat="server"style="cursor: pointer;"width="100%"><asp:LabelID="Label1"runat="server"Text="Label">Show Details...</asp:Label></asp:Panel><asp:PanelID="Panel2"runat="server"style="overflow:hidden;height:0"width="100%">

Not many details here. This is just a demo to show how the DropShadow will react properly to changes in the size of the panel it is attached to.

</asp:Panel><atlasToolkit:CollapsiblePanelExtenderID="cpe1"runat="server"><atlasToolkit:CollapsiblePanelPropertiesTargetControlID="Panel2"Collapsed="true"CollapsedText="Show Details..."ExpandedText="Hide Details"TextLabelID="Label1"ExpandControlID="CollapseHeader"CollapseControlID="CollapseHeader"SuppressPostBack="true"/></atlasToolkit:CollapsiblePanelExtender></p></div></asp:Panel><divclass="demobottom"></div></div><atlasToolkit:DropShadowExtenderID="dse"runat="server"><atlasToolkit:DropShadowPropertiesTargetControlID="Panel1"Width="5"Rounded='true'Opacity=".75"TrackPosition="true"ID="dsBehavior"/></atlasToolkit:DropShadowExtender>

<

SCRIPTLANGUAGE="JavaScript">

<!-- Begin

// Compare two options within a list by VALUES

function

compareOptionValues(a, b)

{

// Radix 10: for numeric values, Radix 36: for alphanumeric valuesvar sA = parseInt( a.value, 36 );var sB = parseInt( b.value, 36 );return sA - sB;

}

// Compare two options within a list by TEXT

function

compareOptionText(a, b)

{

// Radix 10: for numeric values, Radix 36: for alphanumeric valuesvar sA = parseInt( a.text, 36 );var sB = parseInt( b.text, 36 );return sA - sB;

}

// Dual list move function

function

moveDualList( srcList, destList, moveAll )

{

// Do nothing if nothing is selectedif (( srcList.selectedIndex == -1 ) && ( moveAll ==false ))

{

return;

}

newDestList =

new Array( destList.options.length );var len = 0;for( len = 0; len < destList.options.length; len++ )

{

if ( destList.options[ len ] !=null )

{

newDestList[ len ] =

new Option( destList.options[ len ].text, destList.options[ len ].value, destList.options[ len ].defaultSelected, destList.options[ len ].selected );

}

}

for(var i = 0; i < srcList.options.length; i++ )

{

if ( srcList.options[i] !=null && ( srcList.options[i].selected ==true || moveAll ) )

{

// Statements to perform if option is selected, Incorporate into new list

newDestList[ len ] =

new Option( srcList.options[i].text, srcList.options[i].value, srcList.options[i].defaultSelected, srcList.options[i].selected );

len++;

}

}

// Sort out the new destination list

newDestList.sort( compareOptionValues );

// BY VALUES//newDestList.sort( compareOptionText ); // BY TEXT// Populate the destination with the items from the new arrayfor (var j = 0; j < newDestList.length; j++ )

{

if ( newDestList[ j ] !=null ) destList.options[ j ] = newDestList[ j ];

}

// Erase source list selected elementsfor(var i = srcList.options.length - 1; i >= 0; i-- )

{

if ( srcList.options[i] !=null && ( srcList.options[i].selected ==true || moveAll ) )

{

// Erase Source//srcList.options[i].value = ""; srcList.options[i].text = "";

srcList.options[i] =

null;

}

}

}

// End -->

</

script>

</asp:Content>

DropShadow panel within another dropshadow panel

Hello,


I am trying to put a drop shadow extender on a panel around another drop shadow extender but the inside panel is acting funny. I have the panel rounded and looks great but the black shadow part is distorted and at the bottom of the indside panel ? I have tried position absolute in a few places and tried putting a div around it but still no change...

Any thoughts?

So, you are trying to nest one DropShadowExtender on a panel within another DropShadowExtender panel?
That is exactly what I am trying to do... Does anyone know how to make this work?

DropShadow on PopupControl rounded corner error

I am trying to add rounded corners to my drop down calendar control but when I select rounded corners on the DropShadowExtender the calendar disappears. (http://www.mtechglobal.com/sample1.jpg)

If I set rounded corners to false, it works fine. (http://www.mtechglobal.com/sample2.jpg)

I'm also seeing a weird problem if I point the dropshadowextender to the Calendar control directly rather than the containing panel. It seems that the shadow is somehow mis-calculating the position of the control. (http://www.mtechglobal.com/sample3.jpg)

Here is my code:

<asp:Panel ID="Panel1" runat="server" CssClass="popupControl">
<atlas:updatepanel id="UpdatePanel1" runat="server">
<ContentTemplate>
<atlasToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server">
<atlasToolkit:PopupControlProperties TargetControlID="txtFrom" PopupControlID="Panel1" Position="Bottom" />
</atlasToolkit:PopupControlExtender>
<atlasToolkit:DropShadowExtender ID="dse" runat="server">
<atlasToolkit:DropShadowProperties TargetControlID="Panel1" Width="5" Rounded='false' Opacity=".5" TrackPosition="true" ID="dsBehavior" />
</atlasToolkit:DropShadowExtender>
<center>
<asp:Calendar ID="calFrom" runat="server" BackColor="White" BorderColor="Black" CellPadding="2" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
ForeColor="#003399" Width="160px" OnSelectionChanged="calFrom_SelectionChanged" BorderWidth="1px" BorderStyle="Solid" >
<SelectedDayStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
<TodayDayStyle BackColor="#99CCCC" ForeColor="White" />
<SelectorStyle BackColor="#99CCCC" ForeColor="#336666" />
<WeekendDayStyle BackColor="#CCCCFF" />
<OtherMonthDayStyle ForeColor="#999999" />
<NextPrevStyle ForeColor="#CCCCFF" VerticalAlign="Bottom" />
<DayHeaderStyle BackColor="#99CCCC" Height="1px" ForeColor="#336666" Font-Bold="True" Font-Size="7pt" />
<TitleStyle BackColor="#003399" ForeColor="#CCCCFF" BorderColor="#3366CC" Font-Bold="True" />
<DayStyle CssClass="calDay" />
</asp:Calendar>
</center
</ContentTemplate>
</atlas:updatepanel>
</asp:Panel>
<atlasToolkit:DropShadowExtender ID="DropShadowExtender1" runat="server">
<atlasToolkit:DropShadowProperties TargetControlID="Panel1" Width="5" Rounded='false' Opacity=".5" TrackPosition="true" ID="DropShadowProperties1" />
</atlasToolkit:DropShadowExtender>
Any ideas?oh and ignore the second one of these:
<atlasToolkit:DropShadowExtender ID="dse" runat="server">
<atlasToolkit:DropShadowProperties TargetControlID="Panel1" Width="5" Rounded='false' Opacity=".5" TrackPosition="true" ID="dsBehavior" />
</atlasToolkit:DropShadowExtender>

cut and paste error. :)

DropShadow not working.

I am using a DropShadowExtender. Following is my aspxcode:

<%@dotnet.itags.org. Page Language="VB" MasterPageFile="~/Master/Classic/NewMasterPage_CSS.master" AutoEventWireup="false" CodeFile="ClassSchedule.aspx.vb" Inherits="General_Schedule_ClassSchedule" %
<%@dotnet.itags.org. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Main" Runat="Server">
<asp:Panel ID="Panel1" runat="server" BackColor="Gold">
<asp:Button ID="Button1" runat="server" Text="Button" /></asp:Panel>
<cc1:DropShadowExtender ID="DropShadowExtender1" runat="server">
<cc1:DropShadowProperties TargetControlID=Panel1 Opacity=.8 Rounded=true TrackPosition=true ></cc1:DropShadowProperties>
</cc1:DropShadowExtender>
</asp:Content>

When the page is rendered, the dropshadow is rendered somewhere else on the page.

This is likely due to margins, tables, scroll, or padding defined in your CSS and/or master page. This is a known issue that we're working addressing. Thanks!

Any up date on this issue? Is there a fix or a workaround some one knows?

Thanks


I tried to use it. The shadow and the control barely touch (bottom right corner of panel just overlaps top left corner of shadow) when used in the ItemTemplate of a FormView on a Content page. It seems to work properly on a standalone page. If I use negative numbers for the Width, I can get move the shadow up and down, but the X-axis is still off.

I also see that if I turn rounded corners on it behaves very badly. The shadow renders (in the wrong place) and the rounded corners that should enclose my panel render, but my panel and its controls are not rendered at all. If I apply a border to my panel it is rendered in the proper dimensions and it contains the top and bottom rounded corners. The shadow is rendered in the proper size but in the wrong location. It also appears to be in front of the border.

I sure would like to use it.


Does anyone know if this issue of the drop shadow is addressed and fixed in VWD 2008 / .NET 3.5? I'm still using VWD 2005 / .NET 3.0 and I'm wary about upgrading when new things first come out, but if the latest versions are much better, I may reconsider.

DropShadow not moving?

I have a DropShadow attached to a panel that is also a DragPanel and a ModalPopup. What happens is that I can move the panel but the shadow is moving after I drop the panel and not during the drag phase, then after I drop the panel the shadow redraws itself at the right place.

What can I do?

DropShadow in TrackPosition mode uses window.setTimeout to check for movement of its TargetControlID. It sounds like that event isn't firing during the drag operation and so you're not getting updated shadow positions. (Does this happen on all browsers?) You might consider making the DragPanel apply to a Panel that contains both the current content AND the DropShadow that's being attached to it. Then there won't be positioning to update since the shadow will automatically travel with its content.


Thank you David.

DropShadow hides my menu items on back

I used dropshadow and when I pull down menut item to navigate to other page I cannot click on it as it's hide behind dropshadowextender?

On the menu element, try setting:

<asp:Menu id="Menu1" style="position:relative:z-index:5" ... >


I tried this and this does not work! The shadow override the menus.

This worked when I removed this tag:

<

atlasToolkit:DropShadowExtenderID="dse"runat="server"><atlasToolkit:DropShadowPropertiesTargetControlID="Panel1"Width="5"Rounded='true'Opacity=".75"TrackPosition="true"ID="dsBehavior"/>

</

atlasToolkit:DropShadowExtender>

Yes I had to remove the shadow to get this going even though my menu has:

<asp:MenuID="Menu1"runat="server"DataSourceID="SiteMapDataSource1"Font-Bold="true"style="position:relative; z-index:5">

It's the 2nd level menus that are hidden underneath the shadow. I think it completely ignores the Z-index of the menu


That worked for me but I have more question,

1) how to make size of both panel and table look same so that I have good effect of drop shadow, as with the below code my panel is too big and table is inside the panel. I tried to make size of both table and panel same still does not work.

2)How to use different color besides black for shadow?

<

asp:PanelID="pnlTable"runat="server">
<tableclass="table">
<tr>
|<tdcolspan="2"class="heading">Search Parts By Supplier or Return Parts</td>
</tr>
<tr>
<tdclass="tdheading">Supplier ID</td>
<td><asp:TextBoxID="txtsearchsuppID"runat="server"Width="208px"></asp:TextBox></td>
</tr>
<tr>
<tdclass="tdheading">From Date<asp:TextBoxID="txtfromdate"runat="server"></asp:TextBox>
<asp:PanelID="pnlFrom"runat="server">
<asp:CalendarID="fromClnd"runat="server"OnSelectionChanged="fromClnd_SelectionChanged">
</asp:Calendar>
</asp:Panel><cc1:CollapsiblePanelExtenderID="CPEfromClnd"runat="server"><cc1:CollapsiblePanelPropertiesCollapseControlID="txtfromdate"Collapsed="True"AutoCollapse="True"AutoExpand="True"CollapsedSize="0"ExpandControlID="txtfromdate"ExpandedSize="180"TargetControlID="pnlFrom"/></cc1:CollapsiblePanelExtender></td></tr>
<tr>
<tdcolspan="2"><asp:ButtonID="btnSearch"runat="server"Text="Search"OnClick="btnSearch_Click"/>
</td></tr>
</table></asp:Panel>

The DropShadow isn't ignoring the zIndex of the menu - it has no knowledge of it. I suspect that the sub-menu items created by the ASP.NET menu control don't have zIndexes on them, so they default to 0 which causes them to show up beneath the dropshadow items.


The Sub Menus don't have a style property to adjust unlike the asp:Menu. They have a CssClass which is what I'm assuming you mean.

I removed the following off the panel to show the underlying shadow.

CssClass="dropShadowPanel"

Then I placed z-index: 155 everywhere for the menu.

<asp:MenuID="Menu1"runat="server"DataSourceID="SiteMapDataSource1"StaticDisplayLevels="1"Font-Bold="true"Style="z-index:115"><StaticMenuItemStyleCssClass="MenuStyle"VerticalPadding="2px"/><DynamicHoverStyleCssClass="MenuStyle"BackColor="#e1ecfc"/><DynamicMenuItemStyleCssClass="MenuStyle"BackColor="#e1ecfc"/></asp:Menu>

.MenuStyle

{FONT-SIZE:8pt;VERTICAL-ALIGN:top;FONT-FAMILY:verdana;PADDING-BOTTOM:5px;z-index:115}

The menu appears beneath the shadow regardless of all the combinations I have tried.

A quick fix but I lose screen space is:

StaticDisplayLevels

="2"


Oh - ok. Yeah, the dropshadow is absolutely positioned. Since your items are statically positioned, they have a different zIndex stack. Sorry, I didn't think of that. Try adding "position:relative" to your MenuStyle class (and specify that on your Menu control's CssClass property too).


No you're not slipping. You mentioned that before. :)

It's beyond me. I've gone throught the 2 stylesheets I have and I can't figure it out.

I'm down to:

<asp:MenuID="Menu1"runat="server"DataSourceID="SiteMapDataSource1"StaticDisplayLevels="1"Font-Bold="true"Style="position:relative; z-index:30"><StaticMenuItemStyleCssClass="MenuStyle"VerticalPadding="2px"/><DynamicHoverStyleCssClass="MenuStyle"BackColor="#e1ecfc"/><DynamicMenuItemStyleCssClass="MenuStyle"BackColor="#e1ecfc"/></asp:Menu>

.MenuStyle

{FONT-SIZE:8pt;VERTICAL-ALIGN:top;FONT-FAMILY:verdana;PADDING-BOTTOM:5px;position:relative;z-index:30}

On load up it flashes ontop then quickly reverts underneath. I'musing IE6.0 SP2. I'll send the source if you are really keen! :)


I have same issue like Glyder, on load up it flashes for a second for many Atlast control like dropshadow, collapsible Panel etc.
second issue is I loose my css style sheet setting any where I use atlas control. when it post back it settings are applied.
Example:

Suppose I applied css="table" for table it does not take affect until first post back, how to take care of this both problem.This will be really helpful if we can figure this out.


Hmm - yeah I'd like to take a look at this. If you could send me a repro, I'd appreciate it.
what is repro? my code?
<atlas:ScriptManagerID="SM"EnablePartialRendering="true"runat="server"></atlas:ScriptManager><atlas:UpdateProgressID="Progress"runat="server"><ProgressTemplate>

Updating Please Wait...

<imgalt="Wait"id="ImgWait"src="Images/Wait_indicator_flower.gif"/></ProgressTemplate></atlas:UpdateProgress>
<atlas:UpdatePanelID="Up1"runat="server"><ContentTemplate><asp:PanelID="pnlParent"DefaultButton="btnaddparSupp"runat="server"Visible="False"><tableclass="table"><tr><tdcolspan="2"class="heading1">

Supplier Maintenance - Setting up New Supplier Information

</td></tr><tr><tdstyle="width: 153px"align="left">

Supplier Name

</td><tdstyle="width: 334px"align="left"><asp:TextBoxID="txtparSuppName"runat="server"></asp:TextBox><asp:RequiredFieldValidatorID="ReqParSuppName"runat="server"ControlToValidate="txtparsuppName"ErrorMessage="Req"></asp:RequiredFieldValidator></td></tr>

<

tr><tdalign="center"colspan="2"class="tdheading"><asp:ButtonID="btnaddparSupp"runat="server"Text="Add"/><asp:ButtonID="btncancelparSupp"runat="server"CausesValidation="False"EnableViewState="False"Text="Cancel"/></td></tr></table></asp:Panel></ContentTemplate><Triggers><atlas:ControlEventTriggerControlID="btnParent"EventName="Click"/></Triggers></atlas:UpdatePanel>

The XHTML you're using including the menu, the DropShadowExtender, and the panel it's targeting please.

Also, please use a smaller font size when pasting in code. Thanks.


Hi, I've the same problem as you, and I found a workaround:
I have a panel where my menu is:
<asp:Panel ID="menuPanel" runat="server" CssClass="menuDiv" Style="z-index:115">
<asp:Menu ID="Menu1" runat="server">
<Items>
... (items)
</Items>
<StaticHoverStyle BackColor="#990000" ForeColor="White" />
</asp:Menu>
</asp:Panel>
then other panel for the content of the page:
<asp:Panel ID="mainPanel" runat="server" CssClass="mainDiv">
...
</asp:Panel>
then I apply the shadow to the mainPanel, but also I have to apply shadows to menuPanel (otherwise doesn't work):
<cc1:DropShadowExtender ID="DropShadowExtender1" runat="server">
<cc1:DropShadowProperties TargetControlID="mainPanel" />
</cc1:DropShadowExtender
<cc1:DropShadowExtender ID="DropShadowExtender2" runat="server">
<cc1:DropShadowProperties TargetControlID="menuPanel" />
</cc1:DropShadowExtender>
And it works!!! but that's not the perfect way. As you can see I have to apply shadow on both panels, and in the menuPanel I have to put  Style="z-index:115", and the most strange is that if a put z-index in a CssClass (menuDiv in my case) i doesn't work, I have to put it in the control itself.

Haha, thanks Matias I was able to get around a similar issue by using your method.

DropShadow Extender: Opacity-property problem

I create Atlas-website, put ScriptManager on top of the page, add panel and set height, width and background-color properties. Then i add AtlasToolkit Dropdown Extender on the page ja set it's properties. My problem is that the dropshadow is only visible when Opacity is set to 1.0. If I set Opacity-property to less than 1.0 eg. 0.75, Panel-control doesn't show drop shadow. Am I missing something?

DropShadow-sample page works though..

Which browser are you using? But you're saying the sample is working okay, so I'm not sure what's wrong. If opacity is 1.0, the extender doesn't bother to apply the OpacityBehavior, which manages the opacity property. It would be interesting to see if the OpacityBehavior works on your panel. Maybe take a closer look at any differences between the sample and your page?


I'm using IE6 & IE7.

This markup with opacity set to .7 doesn't show dropshadow for panel:

<%@.PageLanguage="VB"AutoEventWireup="true"CodeFile="Default.aspx.vb"Inherits="_Default"%>

<%@.RegisterAssembly="AtlasControlToolkit"Namespace="AtlasControlToolkit"TagPrefix="atlasToolkit"%>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title>mySample Page</title>

<styletype="text/css">

.panelStyle {

width:350px;

height:250px;

background:#517dbf;

}

</style>

</head>

<body>

<formid="form1"runat="server">

<atlas:ScriptManagerID="ScriptManager1"runat="server"/>

<div>

<asp:PanelID="Panel1"runat="server"CssClass="panelStyle">

</asp:Panel>

<atlasToolkit:DropShadowExtenderID="DropShadowExtender1"runat="server">

<atlasToolkit:DropShadowProperties

TargetControlID="Panel1"

Width="5"

Opacity=".75"

TrackPosition="true"

Rounded="false"/>

</atlasToolkit:DropShadowExtender>

</div>

</form>

<scripttype="text/xml-script">

<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">

<references>

</references>

<components>

</components>

</page>

</script>

</body>

</html>

But when I add the checboxlist w/ onclick-events from the samplepage , dropshadow is visible when checkbox is checked: now opacity values from .25 to .75 are working ok.

On DesignView DropShadowExtender1-Control displays error-text: 'TargetProperties' could not be initialized. Details: 'TargetProperties' could not be added to the collection. Details: 'dsBehavior' could not be set on property 'ID'. Doesn't throw any run-time errors.

<%@.PageLanguage="VB"AutoEventWireup="true"CodeFile="Default.aspx.vb"Inherits="_Default"%>

<%@.RegisterAssembly="AtlasControlToolkit"Namespace="AtlasControlToolkit"TagPrefix="atlasToolkit"%>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title>mySample Page</title>

<styletype="text/css">

.panelStyle {

width:350px;

height:250px;

background:#517dbf;

}

</style>

</head>

<body>

<formid="form1"runat="server">

<atlas:ScriptManagerID="ScriptManager1"runat="server"/>

<div>

<asp:PanelID="Panel1"runat="server"CssClass="panelStyle">

</asp:Panel>

<atlasToolkit:DropShadowExtenderID="DropShadowExtender1"runat="server">

<atlasToolkit:DropShadowProperties

ID="dsBehavior"

Opacity=".75"

Rounded="false"

TargetControlID="Panel1"

TrackPosition="true"

Width="5"/>

</atlasToolkit:DropShadowExtender>

</div>

<divstyle="padding: 15px;">

<labelfor="chkShadow">

Show Drop Shadow:

</label>

<inputid="chkShadow"checked="checked"onclick="var b = $object('dsBehavior'); b.set_Width(chkShadow.checked ? 5 : 0);"

type="checkbox"/><br/>

<labelfor="chkRounded">

Rounded:

</label>

<inputid="chkRounded"checked="checked"onclick="var b = $object('dsBehavior'); b.set_Rounded(chkRounded.checked);"

type="checkbox"/>

<div>

Opacity:

<inputid="opacity25"name="opacityValues"onclick="$object('dsBehavior').set_Opacity(this.value);"

type="radio"value=".25"/><labelfor="opacity25">25%</label>

<inputid="opacity50"name="opacityValues"onclick="$object('dsBehavior').set_Opacity(this.value);"

type="radio"value=".5"/><labelfor="opacity50">50%</label>

<inputid="opacity75"checked="checked"name="opacityValues"onclick="$object('dsBehavior').set_Opacity(this.value);"

type="radio"value=".75"/><labelfor="opacity75">75%</label>

<inputid="opacity100"name="opacityValues"onclick="$object('dsBehavior').set_Opacity(this.value);"

type="radio"value="1.0"/><labelfor="opacity100">100%</label>

</div>

</div>

</form>

<scripttype="text/xml-script">

<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">

<references>

</references>

<components>

</components>

</page>

</script>

</body>

</html>


My best guess is that this has something to do with your video card/driver. I'm not sure how IE (or FireFox) does opacity but your first sample works fine for me for all Opacity values. Note I also do not get the design time errors you're mentioning, but that shouldn't affect the runtime behavior. Does it work in other browsers for you?

I've tried with FF & IE and two different laptops with same results (both laptops have VS 2005 Team Developer installed). I don't think it's video card/driver 'cause SamplePage's checkboxlist w/ onclick-events works ok. (BTW i have NVIDIA FX 1400 Go 256Mt-video card.) DesignView error happens when I add ID-property for the DropShadowProperties. Error disappears when I remove ID-property.

IntelliSense shows only "Opacity, Rounded, TargetControlID, TrackPosition and Width"-properties, no Id-property? I uninstalled and reinstalled all Atlas relatud stuff and created a new Atlas-website, but no dropshadow with opacity less than 1.0.

I'll keep digging.. or just use CSS-based dropshadows..Sad [:(]


This markup displays default dropshadow with opacity 1.0:

<

atlas:ScriptManagerID="ScriptManager1"runat="server"EnablePartialRendering="true"/><div>
<asp:PanelID="Panel1"CssClass="panelStyle"runat="server"></asp:Panel>
<atlasToolkit:DropShadowExtenderID="DropShadowExtender1"runat="server"EnableViewState="true">
<atlasToolkit:DropShadowPropertiesTargetControlID="Panel1"/>
</atlasToolkit:DropShadowExtender>
</div>

BTW) Why tagprefix is cc1 and not atlasToolkit (you have to manually change it)

From the DropShadowProperties.cs:

// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Permissive License.
// Seehttp://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.


using System.Web.UI.WebControls;
using System.Web.UI;
using System.ComponentModel;
using Microsoft.AtlasControlExtender;

namespace AtlasControlToolkit
{
public class DropShadowProperties : TargetControlPropertiesBase<Panel>
{

/// <summary>
/// The opacity of the shadow, from 0 (transparent - no shadow rendered) to 1.0, which is fully opaque black.
///The default is .5.
/// </summary>
[DefaultValue(1.0f)]<-- This is not default .5
public float Opacity
{
get
{
return GetPropertyValue<float>("Opacity", 1.0f);<-- This is not default .5
}
set
{
SetPropertyValue<float>("Opacity", value);
}
}


Yes, that's a documentation bug, thanks for pointing it out.

The tag prefixes are arbitrary. They default to "cc1" or whatever, there isn't any way to specify them automatically.

Thanks!


Oh - the ID field is marked Browsable(false) so it won't show up in intellisense.

It's not needed in the 90% case and you can get yourself in trouble (e.g. if you use it in a repeater) so it's hidden.

Dropshadow extender for DIV doesnt resize

Hello! This is my first post and I am new to AJAX . I have a few questions about the dropshadow extender:

1. Does it only work with server-side controls (with runat="server" attribute)?

2. I am trying to fetch XML data from a file using the XMLHttpRequest object and putting the rsult in a div. The div resizes according to the volume of content. However, if I try to extend it using the DropShadow extender, the drop shadow doesn't resize. Am I missing something here?

Thanks in advance.

Added later:

Hi,

1. Yes, it can only be used to extend server side controls.

2. Please set TrackPosition to true to make the extender change its size according to the size of its target. You may find this in the sample web site of the AjaxControlToolkit.

Hope this helps.


Thanks Raymond!

I know how to make it work now.

DropShadow Extender

Hi everybody,

I have noticed a problem with this control: when it runs on a page, if the user resize the window browser the control moves to fit to the new size, but the shadow doesn't. It happen this to you too ?

Consider setting TrackPosition="true" for the DropShadowExtender.
Thanks Davis, now it works fine.
Thanks David, now it works fine.

DropShadow does not like height:auto or width:auto?

This is causing an initialize argument error when used with panel using styles either height:auto or width:auto?Since auto is the default, can you simply remove the hight/width style declarations?

DropShadow Color???

This may be a silly question... but how do you set the color of the dropshadow?

Thanks

With the one in the AtlasControlToolkit, you can't (ok, ok, you could manually modify the nodes, but it's not a property you can set). See the link in my signature.

dropshadow cant have more than one panel across?

Hi,

I've just been looking at the dropshadow control and tried to make more than one panel appear horizontally next to each other. Unfortunately they seem to appear under each other vertically even when you set the width to something really low like 100px. None of your examples show more than one panel in them horizontally so I'm wondering if this is a correct limitation. And even trying absolute positioning totally breaks these panels! :(

Can you have more than one dropshadow panel across, because for my purposes it is useless without this capability?

Regards,
Andrew.

Sorry, not sure I understand. Mind posting a simple sample?


Ah, I've figured it out now.

It's a DIV CSS issue since everything is rendered to div's.

Adding the style - float: left; allows multiple div's to appear next to each other.

Andrew.


Did you know if you change RenderMode="inline" it uses Span instead?