x:Classattribute is used to associate the markup with the code-behind class.
InitializeComponentis called from the code-behind class's constructor to merge the UI that is defined in markup with the code-behind class. The combination of
InitializeComponentensure that your implementation is correctly initialised whenever it is created. The code-behind class also implements an event handler for the button's
Clickevent. When the button is clicked, the event handler changes the text of the button by setting a property on the