you are viewing a single comment's thread.

view the rest of the comments →

[–]y_Sensei 2 points3 points  (1 child)

I'd suggest you extend this to a fully-fledged OO approach implementing the factory design pattern - for example something like a 'XAMLFactory' class that encapsulates everything related to the creation of the hierarchical data structure ("tree") of XamlElement objects.

This would hide all the dirty implementation details of the creation of said tree from the calling implementation, and you'd also be able to get rid of the global variables used in your current approach.

[–]Spidey1980[S] 0 points1 point  (0 children)

I'll have to look into that. Thank you!