Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
require "silverlight" require 'mint' require 'controls/clock' class App < SilverlightApplication use_xaml def initialize message.text = "Welcome to Ruby, Silverlight, and Mint!" # We customized the trace panel, and this will show a message puts "testing the trace panel" # Create a new Clock control clock = Clock.new clock.clock_name.text = "I can access a textblock as if clock were actually the xaml" clock_container.children.add clock # Listen for a custom event clock.custom_event do |sender, event| puts "App: About to change clock name" clock.name = "Instead of directly accessing members of the xaml, I can call functions in my code-behind class" end end end $app = App.new
This paste will be private.
From the Design Piracy series on my blog: