wpf - How does a XAML definition get turned into an object instance? -
xaml allows specify attribute value using string contains curly braces. here example creates binding instance , assigns text property of textbox element.
<textbox text="{binding elementname=foo, path=bar}"/>
i want extend xaml developer enter valid...
<textbox text="{mycustomobject field1=foo, field2=bar}"/>
this create instance of class , set field1/field2 properties appropriate. possible? if how do it?
if possible have followup question. can take string "{binding elementname=foo, path=bar}" , ask framework process , return binding instance specified? must done somewhere make above xaml work , there must way ask same thing processed.
take @ markupextensions http://blogs.msdn.com/wpfsdk/archive/2007/03/22/blogpost-text-creatingasimplecustommarkupextension.aspx
Comments
Post a Comment