Building IronRuby WPF GUIs

后端 未结 1 1326
慢半拍i
慢半拍i 2021-01-24 12:31

This may be a silly question but I was under the impression that it was possible to use IronRuby and MS Visual Studio 2010 together to sort of build interfaces\\edit XAML in one

相关标签:
1条回答
  • 2021-01-24 12:53

    In order to build GUIs you should use XAML with WPF. You can create XAML with the editor in Visual Studio. Running a XAML file is possible with:

    require "PresentationFramework"
    include System::Windows
    include System::Windows::Markup
    
    xaml = File.Open('d:/app/window1/xaml', "r").read
    @root = System::Windows::Markup::XamlReader.parse(xaml)
    
    app = System::Windows::Application.new
    app.run @root
    

    Please refer to IronRuby Unleashed for more information

    0 讨论(0)
提交回复
热议问题