require"silverlight"require'mint'require'controls/clock'classApp< SilverlightApplication
use_xaml
definitialize
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"endendend$app=App.new