#93 – Specifying Markup Extensions Using Property Element Syntax

Markup extensions are typically expressed directly as property values using braces–{, }. (Property attribute syntax).

 <Button Name="btnOne" Background="{StaticResource aliceBrush}" Content="Dum" Height="23" Width="75" />

But a markup extension can also be expressed using property element syntax.  The XAML fragment below is equivalent to the one listed above.

 <Button Name="btnOne" Content="Dum" Height="23" Width="75">
         <StaticResource ResourceKey="aliceBrush"/>

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: