1
我希望我的应用程序在执行代码时更新屏幕信息。我尝试了this.LayoutRoot.UpdateLayout();
,但它不起作用,我不明白为什么。谁能帮我? 应用程序从单击的按钮中获得按钮属性,然后将其用于Model类中的几件事,然后我希望它向用户显示一条消息。从那以后,我希望它继续执行更多的东西(AI)...:S更新屏幕/显示屏上的数据信息
public void showMsgFromModel(string player, string msg)
{
if(player!="")
txNomeMsg.Text = player + ":";
else
txNomeMsg.Text = player;
txMsg.Text = msg;
this.LayoutRoot.UpdateLayout();
System.Threading.Thread.Sleep(1500);
}
我很抱歉,但它没有工作,应用程序将继续显示消息何时结束执行所有代码而不是何时要求显示 – Ninita
@DianaRodrigues您可以使用后台工作程序显示代码吗?肯定有一些你做错了。 –