Friday, May 28, 2004, 6:02 PM
A 3-Part, 3-Day Weekend XAML Quiz
<FlowPanel xmlns="http://schemas.microsoft.com/2003/xaml"
xmlns:def="Definition" Text.FontSize="24">
<Text>This seems clear enough.</Text>
<Text>
<Text.ImageEffect>
<ImageEffectBlur Radius="3"/>
</Text.ImageEffect>
This is considerably less clear.
</Text>
</FlowPanel>
I've rewritten it using a more compact syntax:
<Text ImageEffect="*ImageEffectBlur(Radius=3)">
This is considerably less clear.
</Text>
- For 1 free UUID, is this legal XAML? Why or why not?
- For 2 free UUIDs, what other popular XAML construct uses the exact same syntax?
- For 3 free UUIDs, what popular C# construct has a similar syntax? How is it subtly different? (Hint: I'm not showing the difference in this example.)
11 comments on this post
Frank Hileman:
2) Data binding
3) attributes
Truly ugly syntax... I hope the xml generated in the designer doesn't look like this.
Saturday, May 29, 2004, 6:08 AM
Marc Clifton:
It looks like a mishmash of data binding, class instantiation, and property setting, all rolled into one.
Yuck.
Saturday, May 29, 2004, 7:07 AM
Ian Griffiths:
Isn't it simply that data binding is one of the places where you'll often see this exact same syntax used?
The * syntax that Chris showed is a way of instantiating a particular class as the value of a property, with the ability to set its attributes internally.
It's not actually databinding syntax at all. (It's just that you often see the exact same syntax used to instantiate a data binding property.)
Monday, May 31, 2004, 9:30 AM
Chris Sells:
Tuesday, Jun 1, 2004, 4:24 AM
Frank Hileman:
Tuesday, Jun 1, 2004, 11:07 AM
Alexander Pigolkin:
2. Property aliasing uses the same syntax.
Tuesday, Jun 1, 2004, 1:46 PM
Rob Relyea:
{foo} - is a resource reference.
*ClassName(PropName=Value) - has overlap with compound syntax.
We are mulling over a plan that will consolidate non-literal value syntax options.
Ideally, we'll:
1) limit the number of random ways to do the same thing.
2) still allow for a short syntax for a set of uses - resource references, bindings, and the like
3) consolidate all the star (*) and squiggle ({}) syntaxes we allow in an attribute value to be a well defined extension mechanism.
That being said...whatever we decide to do will take a while to get done and then become public. I hope to have this area cleaned up by the next pdc.
Thursday, Jun 3, 2004, 10:20 PM
xpcjetnqy tbyrkdol:
Sunday, Mar 25, 2007, 3:39 PM
futdgek biptjgyes:
Sunday, Mar 25, 2007, 3:39 PM
vjyat ehar:
Sunday, Mar 25, 2007, 3:41 PM
idnltvo cmyabn:
Sunday, Mar 25, 2007, 3:41 PM




