Thanks Jimmy :)

On Mon, Nov 16, 2009 at 5:32 AM, Jimmy Schementi <
jimmy.scheme...@microsoft.com> wrote:

> 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: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-
> > boun...@rubyforge.org] On Behalf Of Shay Friedman
> > Sent: Friday, July 24, 2009 2:34 AM
> > To: ironruby-core@rubyforge.org
> > 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
> > Ironruby-core@rubyforge.org
> > http://rubyforge.org/mailman/listinfo/ironruby-core
>
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core@rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>



-- 
--------------------------------------------------
Shay Friedman
Author of IronRuby Unleashed
http://www.IronShay.com
Follow me: http://twitter.com/ironshay
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to