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

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -