Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Add Comment
Please, Sign In to add comment