XAML allows you to specify an attribute value using a string containing curly braces. Here is an example that creates an instance of Binding and assigns it the Text property of a TextBox.
<TextBox Text="{Binding ElementName=Foo, Path=Bar}"/>
I want to extend XAML so that the developer can introduce it as valid ...
<TextBox Text="{MyCustomObject Field1=Foo, Field2=Bar}"/>
This will instantiate my class and set the properties of Field1 / Field2 accordingly. Is it possible? If so, how do you do it?
If possible, I have the following question. Can I take the line "{Binding ElementName = Foo, Path = Bar}" and ask the framework to process it and return the Binding instance that it specified? This should be done somewhere already in order to get the aforementioned XAML to work, and therefore there should be a way to ask the same thing to be handled.
source share