I'm new to Xamarin, I want to make an application who every day, a phrase change. I want to use a timer to change the phrase.
I tried several tutorials but didn't work to me.
Here's a example on my XAML and C# code who I made actualy:
XAML
<ScrollView Grid.Row="1">
<StackLayout Orientation="Vertical" Padding="30,24,30,24" Spacing="10">
<Label x:Name="Label_Time" Text="[TIME]" FontSize="Title" HorizontalOptions="Center"/>
<Label Text="before the new enigma" FontSize="Subtitle" HorizontalOptions="Center"/>
<Label Text="You can resolve now or waiting tomorrow for a new enigma." FontSize="20" Padding="0,0,0,0"/>
<Entry x:Name="Label_Answer" Placeholder="Enter the answer"/>
<Button Text="Answer" BackgroundColor="#487eb0" Clicked="OnButtonClicked"/>
</StackLayout>
</ScrollView>
C#
public void RandomEnigma(object sender, EventArgs e)
{
var enigmas = new List<string>()
{
"My first is the main color of the earth, my second can be used to move, my third is for surviving. My everything is a liquid. What is that ?",
"Very childish, I can introduce children to programming. What is my name ?",
};
}
private void OnButtonClicked(object sender, EventArgs e)
{
// WIP
}