attached properties - How to find if a property is attachable or not in wpf ? -
<grid width="100"> <grid.style> <style> <setter property="ellipse.height" value="300"/> <setter property="ellipse.fill" value="blue"/> <setter property="grid.background" value="green"/> </style> </grid.style> <ellipse name="elp" width="100" height="100"></ellipse> </grid>
above code works expected except ellipse.fill . guess is not attached property ellipse.height . so, how check if property attachable or not ?
above code doesn't produce error ever.
fill property defined in shape class , not grid. code tries apply fill property in grid not valid , doesn't work.
also aware ellipse.height property doesn't belongs ellipse frameworkelement. grid framework element , gets applied.
if think <setter property="ellipse.height" value="300"/> sets ellipse height 300, that's not happening here. sets grid.height 300.
wpf attached-properties
No comments:
Post a Comment