Skip to content

Instantly share code, notes, and snippets.

@Ball
Ball / bad_example.rb
Created August 15, 2009 16:27
A bad example of WPF and IronRuby
require 'PresentationCore'
require 'PresentationFramework'
Application = System::Windows::Application
HorizontalAlignment = System::Windows::HorizontalAlignment
SizeToContent = System::Windows::SizeToContent
Thickness = System::Windows::Thickness
Window = System::Windows::Window
Button = System::Windows::Controls::Button
@Ball
Ball / Rubish WPF step one.rb
Created August 14, 2009 12:58
Some extentions to WPF classes to make WPF easier in Ironruby
require 'PresentationCore'
require 'PresentationFramework'
include System::Windows
include System::Windows::Controls
class FrameworkElement
def self.create_new( hash )
elem = new()
hash.each_pair do |key, value|
elem.send( "#{key}=".to_sym, value)