2006 AD. Microsoft Still Doesn’t Get It
Yes, they have built a XML user interface language. In their docs and tutorials however, there is no mention of CSS. To define style, you use inline attributes.
Proof once again that VB-itis is a chronic and contagious disease.
Further reading: http://www.devx.com/webdev/Article/20834
Categories: programming
Why should it need CSS-like syntax for defining styles ?
You can have separate styles and you are able to apply a style to a subset of elements etc. Just that you write them in XAML.
There are at least
twothree problems with that:* An XML-based style language is excessively verbose. Just look at XSLT. In all honesty, I don’t know how a “XAML style language” looks like; but I assume that it can’t be much different from XSLT
* CSS is the standard for specifying styles to any type of XML document. Why did MS have to invent their own? I smell chronic NIH-itis here.
* That being said, MS’s own examples promote intermingling of structure and presentation. See http://msdn2.microsoft.com/en-us/library/ms752059.aspx Years of best practices in building XML GUIs don’t matter to them.
Well, it is verbose but at least it’s descriptive. And it’s compiled to binary so it gets over many disadvantages of XML.
I say it’s better to have formatting described in XML thus eliminating the need for another parser (text CSS).
Here’s how you set the background as a gradient, it’s not like XSLT but rather very clean and neat:
And they really had to implement much more than CSS supported, I say it’s the best direction rather than adding CSS extensions etc.
Ah great, wanted to paste some code with setting a gradient background on a button from XML.