【发布时间】:2017-04-13 17:22:42
【问题描述】:
如何将新文本放入 xamarin.forms 中的标签?
如果我在 XAML 中有这个:
<Label Text="{Binding Nombre}" Font="Bold,16" x:Name="tNombre" TextColor="{StaticResource ColorBlanco}" Style="{StaticResource TextAligment}"/>
但是要输入新文本:代码中的情况如何?:我必须使用什么?...我是新来的。
【问题讨论】:
-
您能否将视图中 c# 部分的代码添加到您的问题中?
-
在页面中使用 tNombre.Text = "someText";
-
尝试按照@mww 的方式进行操作,但出现错误:System.NullReferenceException: Object reference not set to an instance of an object
标签: xamarin data-binding binding label xamarin.forms