29. Event Handling < Grid x : Name ="LayoutRoot" Background ="White"> < Button x : Name ="button1" Click ="button1_Click"> </ Button > </ Grid > In the code behind for this XAML file, the event handler looks like this: private void button1_Click( object sender, RoutedEventArgs e) { }
30. XAML and Code < TextBlock x:Name= "txtXAMLHint" Text ="XAML Rhymes with Camel" Width ="100" /> txtXAMLHint.Width = 200; txtXAMLHint.Text = " Camels should learn XAML! " ; In the XAML, within a container: Accessing it in the Code-Behind: