rendered paste bodyrequire 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'require 'PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'# Initialization ConstantsWindow = System::Windows::WindowApplication = System::Windows::ApplicationButton = System::Windows::Controls::ButtonStackPanel = System::Windows::Controls::StackPanelMessageBox = System::Windows::Forms::MessageBox# Create windowmy_window = Window.newmy_window.width = 200my_window.height = 150my_window.title = 'ButtonTest'# Create StackPanel my_stack = StackPanel.newmy_window.content = my_stackbutton1 = Button.newbutton1.content = 'Button 1'button1.font_size = 20button1.click do |sender, args| MessageBox.show 'Button 1'endbutton2 = Button.newbutton2.content = 'Button 2'button2.font_size = 20button2.click do |sender, args| MessageBox.show 'Button 2'endmy_stack.children.add button1my_stack.children.add button2# Run applicationmy_app = Application.newmy_app.run my_window