-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xaml typeprovider component restriction #87
Comments
can you please send a pull request? |
Is there a reason why XamlTypeProvider is not using System.Windows.Markup.XamlReader instead of XmlReader? |
@nrolland As I understand the code (haven't verified yet), you can have members in the generated type outside of System.Windows.Controls, but they will be of type Object. Xaml documents do list their dependencies, so we can do a better job here. |
Argh, I wanted my pull req to be part of this issue instead of creating a new one, #160. I'm not used to GH. |
Do you have a doc mentioning this resolution of Xaml nodes to the correct types? This is interesting. |
Ok I see what you mean, i was out of it, Yeah so the types will be resolved, but the assembly referenced that contain those types might not be loaded I guess. (Not sure I remember everything) So that is why you say it will be of type object, which kind of spoils the typeprovider fun |
My commit fixes this for external controls, i.e. controls not defined in the current assembly. |
Got it. Ahh.... Multistage execution + a proper composable dependency On Tuesday, November 27, 2012, Robert Jeppesen wrote:
Nicolas Rolland |
This is a brilliant change.. |
Thanks! :) |
#87: Xaml TP supports external components
Can I close this? |
Works for me, but @nrolland should weigh in. |
sure ! thank you robert. it gives me a pretext to look into the specifics of the xamlreader! |
In XamlTypeprovider.fs : createXamlNode we have
As I read (fast) the file, it is therefore only possible to instanciate components from that namespace.
Do you see any obstacle in augmenting this with different components, potentially in other assemblies ?
We'd need to load the dependencies (intercepting System.AppDomain.CurrentDomain.add_AssemblyResolve) , and enhance the XAML parser for getting the namespace.
The text was updated successfully, but these errors were encountered: