//File: Page.xaml.cs using System; using System.Windows; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; namespace SilverlightApplication3 { public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); myButton.Click += new RoutedEventHandler(myButton_Click); } void myButton_Click(object sender, RoutedEventArgs e) { myText.FontFamily = new FontFamily("Comic Sans MS"); myText.FontSize = 30; myText.Text = "Some Cool Text"; myButton.Content = "Clicked"; } } }