F# CTP and Silverlight 2 and XAML
Following up from yesterday, the rudiments of the clock, to show XAML integration in the F# plus Silverlight combination. This should be enough of a template for starting with and mutating to taste.
The code is unchanged in the Feb 2010 (v 1.9.9.9) CTP.
astroclock.xaml
:
which we note has a UserControl
as root, and astroclock.fs
:
with the obvious AppManifest.xaml
:
LATER: Data binding sort of works sometimes; I can get it to work when set at run-time to bind a string
to a TextBlock
via myTextBlock.DataContext <- this.StringProperty
(but not yet through XAML), and Slider
s are being totally recalcitrant...
I think there is some autogeneration magic just not happening for F# -- the best I can get seems to be to approximate a one-time binding -- so it's back to wiring up events by hand.
1 comment :
Hi Steve.
I like what you're doing here.
I plan to try it.
Thanks,
Art Scott
Post a Comment