Tuesday, February 26, 2008

ADO NET Entity Framework Beta 3 Installation Troubleshooting

It is so frustrating to spend a whole day trying to work with a tool and not getting there because you don't know why, but apparently you are installing it all wrong...

ADO .NET EF Beta 3 has 2 patches you need to install in order to be able to use it: Beta 3 patch and EF Tools patch. Or so they say... You also need to install a VS 2008 Patch. I found this tip
here. And installed the VS 2008 patch, then the Beta 3 release and then the Tools. No luck. The ADO NET Entity Data Model Item Template was not showing up in the Add New Item screen of VS 2008. But the VS 2008 command line recognised the edmgen command. Bugger...

After a day and a thousand google searches I found the answer
here. You have to install the VS 2008 patch AFTER the Beta 3 and BEFORE the Tools.

No comment.
Posted by Madalina at 15:48:20 | Permanent Link | Comments (1) |

Friday, February 15, 2008

SharePoint Web Part Rounded Corners - CSS and no inheritance :)

Yes, just as the title reads:
- no custom webparts
- only css styles and images
- any webpart

Lately I have been searching the web for solutions regarding rounded corner webparts. I want to be able to use this solution on any site - so JPEG images as corners are out of question, since I need the webpart displayed on any background. PNG only work in IE7 and above, so first drawback is at the corner.

If you tried working on this much desired skin, you know that the tag layout of the webpart header is not very complex, so you need to play around with CSS selectors and margins and tricks, but none of these combined really does it.

Well here is my trick: the next image is the left corner of the webpart.




If you set this image as background for a TD, the image will stretch as far as the cell goes, so it won't overlap the right corner of the webpart header. You have to make it wide enough for (almost) any resolution/page width/webpart width to display correctly. One the other hand though, many sites today have a fixed width of the main area content, so there you go - you can anticipate how wide the webpart can get.

You also need the right corner image:


Of course, you can use an image that has rounded corners both at the top and the bottom.

And here are the classes:

.ms-WPHeader
{
 background-color:transparent;

}

tr.ms-WPHeader TD /* right corner */
{
 background-color:transparent;
 background-image:url('wpright2.png');
 background-repeat:no-repeat;
 background-position:right top;
 text-align:left;
 vertical-align:top;
 width:35px;
 height:26px;
 margin-top:-1px;
 overflow:visible;
 margin-right:10px;
}

.ms-standardheader.ms-WPTitle /* left corner */
{
 background-color:transparent;
 background-image:url('wpleftlarge.png');
 background-repeat:no-repeat;
 text-align:left;
 padding-left:25px;
 height:25px;
 }

.ms-standardheader.ms-WPTitle A:link, .ms-standardheader.ms-WPTitle A:visited /* title area */
{
 background-color:transparent;
 background-image:none;
 }

.ms-WPHeader DIV /* right corner action arrow */
{
 background-color:transparent;
 background-image:none;
 
 text-align:left;
 width:14px;
 
 overflow:hidden;
 vertical-align:bottom;
 margin-right:10px;
 margin-top:-1px;
 border:0px;
}

.ms-WPHeader TD /* gets rid of the blue bottom border (present in default style)
      under the web part header*/
{
 border: 0px;
}



The IE result:


The Mozilla result:

In Mozilla there is one issue: the webpart actions arrow on the right doesn't recognize the right margin value, so it's right on the edge.


And there you have it. Unfortunately with the drawback of a wide image load, fortunately a solution.

Posted by Madalina at 12:03:04 | Permanent Link | Comments (11) |