Last active
January 23, 2020 12:42
-
-
Save jamesmontemagno/43c5ea6e79633dfe477df1975eca65d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="MyFirstOouiApp.Pages.MyPage"> | |
<ContentPage.Content> | |
<StackLayout> | |
<Label Text="Hello World" FontSize="Large" | |
HorizontalOptions="Center" HorizontalTextAlignment="Center"/> | |
<Button Text="Click Me!!!" Clicked="Handle_Clicked" HeightRequest="50"/> | |
</StackLayout> | |
</ContentPage.Content> | |
</ContentPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using Xamarin.Forms; | |
namespace MyFirstOouiApp.Pages | |
{ | |
public partial class MyPage : ContentPage | |
{ | |
public MyPage() | |
{ | |
InitializeComponent(); | |
} | |
int count = 0; | |
void Handle_Clicked(object sender, System.EventArgs e) | |
{ | |
var button = sender as Button; | |
if (button == null) | |
return; | |
count++; | |
button.Text = $"You clicked {count} times!"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment