silverlight - Assigning to an attached property using a child element -
regular (not attached) properties in xaml can assigned either attribute or child element.
example:
<textblock foreground="blue">some text</textblock>
or:
<textblock> <textblock.foreground> <solidcolorbrush>blue</solidcolorbrush> </textblock.foreground> text </textblock>
since attached properties simple, see examples of assigning them using attribute, example:
<textblock grid.row="1">some text</textblock>
but possible assign attached property using child element?
i have custom control has attached property of complex (class) type. since can't specify value in attribute, i'm not sure how assign xaml.
this feature called property element syntax , yes, can set attached properties using element attribute syntax:
<textblock> <grid.column>1</grid.column> abc </textblock>
Comments
Post a Comment