I was looking through the mailing list archives for unanswered mails ... eek,
sorry Shay! Well, if you still have this question ...
You can also load XAML with System::Window::Application.LoadComponent:
# This loads "foo.xaml" into the "canvas" variable
include System
include System::Windows
include System::Windows::Controls
canvas = Canvas.new
Application.load_component canvas, Uri.new("foo.xaml", UriKind.relative)
This only works when foo.xaml has a x:Class equal to the type passed to the
first arg to load_component, like x:Class="System.Windows.Controls.Canvas".
~Jimmy
> -----Original Message-----
> From: [email protected] [mailto:ironruby-core-
> [email protected]] On Behalf Of Shay Friedman
> Sent: Friday, July 24, 2009 2:34 AM
> To: [email protected]
> Subject: [Ironruby-core] How to run a XAML file?
>
> 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.
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Ironruby-core mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/ironruby-core
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core