Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Binding Example
require 'xamltools.rb'
require 'PresentationFramework'
class ViewModel
attr :greeting, true
def initialize(greet)
@greeting = greet
view = XamlTools::Xaml.window(:Width => 450, :SizeToContent => :Height) do |w|
w.TextBlock(:FontSize => 48, :HorizontalAlignment=> :Center, :Text => "{Binding Path=greeting}")
view.data_context = "I'm Bound!" )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.