Wednesday, March 22, 2006

A Great Evening with Themes

It was a great evening yesterday as everyone loved it, it seems... :-)

This was my third speaking event for our user group.

My last talk was about Delegates and I know most of them did not get anything from what I talked. And I was really disappointed. May be the examples I gave was not enough or it did not make the point that I wanted to convey.

But this time, it was different. Although I stumbled for few minutes, I made that up after some time, thanks to the audience.

Wednesday, March 08, 2006

Themes and Skins - Part 2

This is a follow up on my previous post on the similarity between Skins/Themes in ASP.NET 2.0 and Styles/CSS in pre-.NET era.

A CSS file looks typically like this:

The first notation (H1) is called a Default Style. This is because all the elements with in <h1> tag would be rendered as BOLD.

The second notation (.BoldHeader) is called a Named Style. "Named", as the set of styles have a name. The phrase (word, actually) after the "." is the name given to the style. And any controls (oops! elements, I mean :-)) referring to this name would be rendered as BOLD.

I would not go in-depth, explaining the how-to about implementing themes and skins using CSS, as there are a plethora of articles in the internet.

There is a very interesting article, by Claus Augusti, about implementing Themes using CSS and Javascript. Read on!

Now, lets dive into ASP.NET 2.0. What's different in here? Here we have a .skin file (a file with .skin extension (duh!)), which defines the appearances of the controls that are used in a web page. A .skin file would "look" like an ASPX page. Like this, I mean:

-Label.skin file-

As you see, there is no ID property in the label control. Yes, that is the only difference!

NOTE: There is no intellisense support for .skin files. So, if you need to get it done fast, you need to type it in on an ASPX page and then copy/paste into the .skin file.

Then, when you create an ASPX page, mention this theme (ControlsTheme, as you see in the above snapshot).

-An ASPX page-

So, all the labels in the page would appear as specified in the Label.skin file.

You got the gist, right?

As I posted earlier, I am speaking about the Themes and Skins in ASP.NET 2.0 in our local .NET User Group (Central Penn .NET User Group) meeting on March 21.

Tuesday, March 07, 2006

Mug Shot - Temp

Themes and Skins (a.k.a style and CSS :-))

What is a Skin anyways?

Skinning were around pre-.NET, but it was not known as Skins.

When you color a text in your page, you are actually skinning the text. The web gurus abstracted this away into what later came to be known as Styles. Then came CSS (Cascading Stytle Sheets), where you could collect all the styles that you applied to your pages, into one single file. Then there came standards for CSS. This collecting of the styles to one file(.CSS file) was a revolution indeed.

You can relate a style applied to a control in your web page as a Skin and the .CSS file as the Theme of your site.

Themes and Skins - Part 2

R I P Alen Joseph



Yesterday, March 6th 2006, was the 10th death anniversary of my dear classmate, Alen Joseph.