I
I
ITLDS2019-08-05 06:14:32
C++ / C#
ITLDS, 2019-08-05 06:14:32

How to work with label'om specified in .xaml code in c# code (xamarin)?

In the xaml code, I define a label named l:

<Label Text="a" x:Name="l" HorizontalOptions="Center" VerticalOptions="CenterAndExpand" />

And then in the c# code in the procedure, I need to change its text: Error: "The name "l" does not exist in the current context. How to be?
l.Text = "b";

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question