15 Aug 23:23
GTK# Fails The XAML Test
Gerald Bauer <vamp201 <at> yahoo.com>
2004-08-15 21:23:58 GMT
2004-08-15 21:23:58 GMT
Hello, Marc Clifton looked into creating GTK# UIs using MyXAML running under Mono. Marc writes: I eventually got Visual Studio to compile and run a GTK# application (sans MyXaml). This was an arduous task in itself as the "how to" in the above article falls far short of the reality needed to get things working. I'll probably write an article on how to do it. So, the next step was, OK, can XAML be used to instantiate a GTK# object graph? Sadly, the answer is no. I haven't done a lot of exploring, but I found two showstoppers right away. First, there is no default Window constructor. This breaks the first law of XAML compliant classes--you must have a parameterless constructor. OK, maybe this can be handled in the markup some day, but right now, no. And frankly, I think it's bad form to not support a parameterless constructor. Second, (and a very disappointing surprise) is how collections are handled. Take the Window class again. It's derived from Container. OK, well, Container has an Add() method. There is no "Items" property or similar implementation derived from something like IList or ICollection. One would be able to live with that if they used their own I... collection interface, but sadly no. And the real nail in the coffin is the read-only "Children" property, which simply returns an array. Not an Array object, but a straight forward array.(Continue reading)
RSS Feed