Shay Friedman wrote: > Hi, > > I have a WPF xaml file and I'd like to execute it using IronRuby. I know > I can use the System::Windows::Markup::XamlReader.parse method, but is > there another way? > > Using the XamlReader class makes registering events, for example, kind > of an irritating task. > > Thanks, > Shay.
Yes, there is a 'Wpf.rb' in your \Samples\Tutorial directory (This should exist for you if you have a source copy, or the regular 0.6 release) This adds a number of helpers to make working with XAML easier. I haven't looked at it extensively, but I'd say you can probably learn what is doing by running the wpf tutorial in that dir, and following the source. Look for the "load" methods associated with xaml to get an idea of what helpers are added. Also, if you are trying to do something simple, and the XAML is actually getting in the way, Thibaut Barrère's "magic" looks to be a very nice DSL for this: http://github.com/thbar/magic/tree/master -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list [email protected] http://rubyforge.org/mailman/listinfo/ironruby-core
