1
I have sometimes needed to know when a button was clicked and did not find a property natively in C#/Xamarin. For example:
In this image above we have a Entry
with a Text
(for example only) written Pesquisa...
by Defaut and with a function ToUpper
(to capitalize all text), in case I click the button LIMPAR
I wish I could add the text Pesquisa...
again, but the function ToUpper
forces the text to stay PESQUISA...
. So I thought I’d make one if
who did the following:
if (BotãoLimparPressionado = true)
{
EntryPesquisar = "Pesquisa..."
}
else //a função para os outros casos continuariam normais
{
EntryPesquisar.ToUpper
}
But if I’m on the current button putting this
if
doesn’t make any sense.– Deivid Souza
Sorry, it’s just that I found the question self-explanatory, now I tried to improve, I edited it.
– Deivid Souza