Assume you created a button and you'd like to call several functions when this button is pressed. To do that, we need to add event handlers to the button's click. This way, we don't have to write a common task which might be shared by several buttons many many times

      public MainPage()
        {
            InitializeComponent();
            BT1.Content = " Program started";
            BT1.Click += BackgroundCOlorChanged;


            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            i++;
            if (i % 2 == 1)
            {
                Tb1.Text = "You just hovered";
            }
            else
            {
                Tb1.Text = "You hovered again";
            }
        }

        private void BackgroundCOlorChanged(object sender, RoutedEventArgs e)
        {
            Tb2.Text = "ABCDEF";

        }