简体   繁体   English

Xamarin 热重载不会对实时数据进行设计更改

[英]Xamarin Hot Reload doesn't make design changes to live data

When I make a change, such as a text color to XAML, in this case a label, during Hot Reload/Debug, the label's text is disappeared.当我进行更改时,例如将文本颜色更改为 XAML,在本例中为 label,在热重载/调试期间,标签的文本消失了。 (Or) It doesn't reassign the label. (或)它不会重新分配 label。

It seems Hot Reload doesn't make changes to the design of data assigned at runtime or compiled time.似乎热重载不会更改在运行时或编译时分配的数据设计。

Is there anyway to fix it?有没有办法修复它? or Does Xamarin Hot Reload has a missing feature?或者 Xamarin 热重载是否缺少功能?

<Label x:Name="label1" HorizontalOptions="Center" 
VerticalOptions="CenterAndExpand" TextColor="Blue"/>
public MainPage()
{
     InitializeComponent();
     label1.Text = "Label 1";
}

Please update for VS version to 16.7 or later, I test it in the 16.6.0 it not work, but it could be work in the VS version to 16.7.请将 VS 版本更新到 16.7 或更高版本,我在 16.6.0 中测试它不起作用,但它可以在 VS 版本到 16.7 中工作。 or later或以后

And set reload option like following screenshot并设置重新加载选项,如下面的截图

在此处输入图像描述

Here is running GIF.这里正在运行 GIF。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM