Unable to get Hot Reload to work on ListView

1 Answer 81 Views
ListView
Kenneth
Top achievements
Rank 1
Kenneth asked on 17 Oct 2023, 12:25 PM

On a simple project with Telerik installed, I can change the FontSize on a simple standard label and Hot Reload works.  If I try to change the FontSize on a column in a ListView (in another project), Hot Reload does not work.  Settings in Tools\Options all appear to be the same between the projects.  Screen Print attached.


<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
             xmlns:viewModels="clr-namespace:peMove.Maui.LookupViewModels"
             x:Class="peMove.Maui.Pages.MainPage">

    <telerik:RadListView x:Name="listView" ItemsSource="{Binding Source}" MinimumWidthRequest="100" >
        <telerik:RadListView.BindingContext>
            <viewModels:ViewModel_L />
        </telerik:RadListView.BindingContext>

        <telerik:RadListView.ItemTemplate>
            <DataTemplate>
                <telerik:ListViewTemplateCell>
                    <telerik:ListViewTemplateCell.View>

                        <telerik:RadBorder x:Name="border01" BorderThickness="0, 0, 0, 1"
                                               BackgroundColor="White"
                                               BorderColor="#b1b1b1">
                            <Grid RowDefinitions="Auto" 
                                      ColumnSpacing="5"
                                      ColumnDefinitions="Auto,*,Auto" Margin="10,10">

                                <!--Column 1: Icon-->
                                <telerik:RadBorder x:Name="border02" 
                                                       Grid.Column="0"
                                                       CornerRadius="20"
                                                       WidthRequest="40" 
                                                       VerticalOptions="Center"
                                                       HorizontalOptions="Center"
                                                       BackgroundColor="{Binding Color}"
                                                       Padding="12,6"
                                                       Margin="10"
                                                       HeightRequest="40">
                                    <Label FontSize="20"
                                               Text="{Binding TypeShort}"
                                               TextColor="#FFFFFFDE"
                                               VerticalOptions="Center" 
                                               HorizontalOptions="Center"/>
                                </telerik:RadBorder>

                                <!--Column 2: Data-->
                                <VerticalStackLayout Grid.Column="1" 
                                                         Spacing="3"
                                                         Margin="0,6,0,6"
                                                         VerticalOptions="Center">
                                    <Label Text="{Binding Id}" 
                                               VerticalOptions="Center"
                                               HorizontalOptions="Start"
                                               FontSize="14"
                                               FontAttributes="Bold"
                                               TextColor="Black"/>
                                    <Label Text="{Binding Name}"
                                               HorizontalOptions="Start"
                                               VerticalOptions="Start"
                                               TextColor="{AppThemeBinding Light='#99000000'}" 
                                               FontSize="16"/>
                                    <Label Text="{Binding Status}"
                                               HorizontalOptions="Start"
                                               VerticalOptions="Start"
                                               TextColor="Black" 
                                               FontSize="10"/>
                                </VerticalStackLayout>

                                <!--Column 3: Quantity-->
                                <Label Grid.Column="2"
                                       Text="{Binding Quantity, StringFormat='{0:F2}'}"
                                       HorizontalOptions="Start"
                                       VerticalOptions="Start"
                                       TextColor="{AppThemeBinding Light='#7E7E7E'}" 
                                       FontSize="16"/>
                            </Grid>
                        </telerik:RadBorder>

                    </telerik:ListViewTemplateCell.View>
                </telerik:ListViewTemplateCell>
            </DataTemplate>
        </telerik:RadListView.ItemTemplate>

    </telerik:RadListView>

</ContentPage>

Kenneth
Top achievements
Rank 1
commented on 17 Oct 2023, 12:49 PM

So reading further about Hot Reload, it is suggested to rebuild the project.  When I rebuild the project I now get XFC0000 Cannot resolve type "http:://schemas.telerik.com/2022/xaml/maui:telerik:RadBorder".  I can still run the program in Debug mode which is weird.  I have tried the fixes for this by using the x:Name and it is not resolving this error.

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 17 Oct 2023, 04:33 PM | edited on 19 Oct 2023, 02:08 PM

Hi Kenneth,

The behavior with hot reload is logged here: https://feedback.telerik.com/maui/1587765-changes-made-in-xaml-are-not-applied-with-hot-reload

Regarding to the schema behavior, I have send a reply to the support ticket, for now as a workaround use the namespace:

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
             xmlns:telerikBorder="clr-namespace:Telerik.Maui.Controls;assembly=Telerik.Maui.Controls"
             xmlns:local="clr-namespace:MauiApp18"
             x:Class="MauiApp18.MainPage">


    <telerik:RadListView x:Name="listView" ItemsSource="{Binding Source}" MinimumWidthRequest="100" >
        <telerik:RadListView.BindingContext>
            <local:ViewModel />
        </telerik:RadListView.BindingContext>

        <telerik:RadListView.ItemTemplate>
            <DataTemplate>
                <telerik:ListViewTemplateCell>
                    <telerik:ListViewTemplateCell.View>

                        <telerikBorder:RadBorder x:Name="border01" BorderThickness="0, 0, 0, 1"
                                               BackgroundColor="White"
                                               BorderColor="#b1b1b1">

Regards,
Didi
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com
Kenneth
Top achievements
Rank 1
commented on 18 Oct 2023, 10:30 AM

Just heard back from support that full support of the Hot Reload is still unplanned.  A similar link: https://feedback.telerik.com/maui/1582732-support-for-hot-restart-feature with the similar response of "they don't know when" was entered over one year ago.  So it doesn't look like full support of Hot Reload is really important to them.  This is a very big concern to me as without Hot Reload the time to design using their tools goes up significantly.  Also not supporting something which is so critical to using MAUI leads me to think that they don't have full commitment to this platform.  For a critical functionality request to still be unplanned one year later does not show me commitment to this platform.
Didi
Telerik team
commented on 19 Oct 2023, 04:41 PM

Hi Kenneth,

Hot Reload and Hot Restart are different features. The link I shared was for Hot Restart. I have updated the link in my initial reply with the correct link for hot reload. 

The link for hot reload issue and RadListView is logged here as a bug report: https://feedback.telerik.com/maui/1587765-changes-made-in-xaml-are-not-applied-with-hot-reload 

I understand the usage of Hot reload in your case. Thank you for your feedback. I have shared it with the management team.
Yes the item is with status Unplanned -  which means a valid bug report still not scheduled for fixing.

Tags
ListView
Asked by
Kenneth
Top achievements
Rank 1
Answers by
Didi
Telerik team
Share this question
or