Xamarin XAML文件在更改某些代码后不会更改

Xamarin XAML文件在更改某些代码后不会更改,xaml,xamarin,Xaml,Xamarin,在我的XAML文件中,在更改其中的一些代码并在手机上调试之后,我所做的更改不会反映在手机上。它一直在显示我的旧代码 旧代码: <ListView ItemsSource="{Binding Allgroups}" RowHeight="75" IsGroupingEnabled="true"> <ListView.ItemTemplate> <DataTemplate>

在我的XAML文件中,在更改其中的一些代码并在手机上调试之后,我所做的更改不会反映在手机上。它一直在显示我的旧代码

旧代码:

<ListView
       ItemsSource="{Binding Allgroups}"
       RowHeight="75"
       IsGroupingEnabled="true">
    <ListView.ItemTemplate>
        <DataTemplate>
             <Label Text="{Binding NameNative}"></Label>
        </DataTemplate>
    </ListView.ItemTemplate>
    <ListView.GroupHeaderTemplate>
        <DataTemplate>
            <ViewCell>
                <Label Text="{Binding TitleWithItemCount}" />
            </ViewCell>
        </DataTemplate>
    </ListView.GroupHeaderTemplate>
</ListView>

新代码:

 <Label Text="HELOO WORLD  "></Label>


我注意到每次运行代码时,它都会不断显示列表。我必须单击“保存”按钮,然后列表消失,hello world出现。

我重置VS设置并重新启动它。 为我工作

        <CollectionView ItemsSource="{Binding Categoriesxx}" IsGrouped="True">
            <CollectionView.ItemsLayout>
                <GridItemsLayout Orientation="Vertical" Span="1" VerticalItemSpacing="5" HorizontalItemSpacing="5"></GridItemsLayout>
            </CollectionView.ItemsLayout>
            <CollectionView.ItemTemplate>
                <DataTemplate>
                    <StackLayout >
                        <Label Text="{Binding NameNative}"></Label>
                    </StackLayout>
                </DataTemplate>
            </CollectionView.ItemTemplate>
            <CollectionView.GroupHeaderTemplate>
                <DataTemplate>
                    <StackLayout BackgroundColor="AliceBlue">
                        <Label Text="{Binding Name}" FontSize="Title"></Label>
                        <Button Image="{Binding StateIcon}"
                                BackgroundColor="Transparent"
                                BorderColor="Transparent"
                                BorderWidth="0"
                                Command="{Binding BindingContext.ExpandCommand ,Source={x:Reference ServiceListPage}}"/>
                    </StackLayout>
                </DataTemplate>
            </CollectionView.GroupHeaderTemplate>
        </CollectionView>


您能提供一段新旧代码中的代码片段吗?您发现缺少预期的更改吗?@Josiah我添加了一些代码您没有编辑
tmp
视图,是吗?如果您将鼠标悬停在视图的选项卡上,则该视图的路径中没有
tmp
,是吗?@JamesS否该视图中没有temp该问题再次出现感谢共享。别忘了接受答案。@WendyZang MSFT I问题再次出现。这次重置和重新启动没有解决问题。@WendyZang MSFT这是我遇到问题的XAML代码。显然,这段代码是导致问题的具体原因。因为当我删除它并只放置一个标签时,它工作得很好。@WendyZang MSFT我将代码从使用List更改为ObservableCollection,并在我的分组类中实现了INotifyPropertyChanged,一切正常。显然,这是一个代码问题,而不是调试器问题。