Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Styles from App.xaml on ListView breaks view #61

Open
Perry89 opened this issue Nov 8, 2024 · 0 comments
Open

Using Styles from App.xaml on ListView breaks view #61

Perry89 opened this issue Nov 8, 2024 · 0 comments

Comments

@Perry89
Copy link

Perry89 commented Nov 8, 2024

Hi,
I've been using your shell for some time and I've noticed issue with views. I have 2 pages that contain similar listviews, recently I have changed one of them to use styles from app.xaml, and noticed that if you have a lot of items in your ListView and start to scroll them, the view breaks leaving just blank spaces. They are still interactivable, so it is pure display issue.

Here is xaml:

<ListView SelectedItem="{Binding SelectedTimesheet}" HasUnevenRows="True" HorizontalOptions="CenterAndExpand" BackgroundColor="{StaticResource Faded}" ItemsSource="{Binding WholeDayTimesheets}">
            <ListView.ItemTemplate>
                <DataTemplate x:DataType="models:WholeDayTimesheetViewModel">
                <ViewCell>
                    <Border Style="{StaticResource MainFormGridBorderStyle}">
                    <Grid Style="{StaticResource TimesheetGrid}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Label Style="{StaticResource TimesheetDayLabel}" Text="{Binding DayOfTheWeek}" Grid.Column="0" Grid.Row="0" />
                        <Label Style="{StaticResource TimesheetLabelPrimary}" Grid.Column="1" Grid.Row="0" Text="{Binding Date}" />
                        <StackLayout Orientation="Horizontal" HorizontalOptions="Start" Grid.Column="0" Grid.Row="1">
                            <Image Source="clock_white" HeightRequest="15" WidthRequest="15" />
                            <Label Style="{StaticResource TimesheetLabelPrimaryMargin}" Text="{Binding StartAndEndTimeLabel}" />
                        </StackLayout>
                        <Label Style="{StaticResource TimesheetLabelBold}" Text="Appointments" Grid.Column="1" Grid.Row="1"  />
                        <StackLayout Orientation="Horizontal" Grid.Column="0" Grid.Row="2">
                            <Label Style="{StaticResource TimesheetLabelBold}" Text="Value Total" />
                            <Label Style="{StaticResource TimesheetLabelPrimaryMargin}" Text="{Binding ValueTotal}" />
                        </StackLayout >

                        <StackLayout Orientation="Horizontal" HorizontalOptions="Start" Grid.Row="2" Grid.Column="1">
                            <Image Source="abacus_white" HeightRequest="15" WidthRequest="15" />
                            <Label Style="{StaticResource TimesheetLabelPrimaryMargin}" Text="{Binding AppointmentsCount}" />
                        </StackLayout>
                        <StackLayout Orientation="Horizontal" Grid.Column="0" Grid.Row="3">
                            <Label Style="{StaticResource TimesheetLabelBold}" Text="Hours Total" />
                            <Label Style="{StaticResource TimesheetLabelPrimaryMargin}" Text="{Binding TotalHours}" />  
                        </StackLayout>
                        <StackLayout Orientation="Horizontal" Grid.Column="1" Grid.Row="3">
                            <Label Style="{StaticResource TimesheetLabelBold}" Text="Day Hours Total" />
                            <Label Style="{StaticResource TimesheetLabelPrimaryMargin}" Text="{Binding HoursCount}" />
                        </StackLayout>
                        <StackLayout Orientation="Horizontal" Grid.Column="1" Grid.Row="4">
                            <Label Style="{StaticResource TimesheetLabelBold}" Text="Narrative" />
                            <Label Style="{StaticResource TimesheetLabelPrimaryMargin}" Text="{Binding Narrative}" /> 
                        </StackLayout>
                    </Grid> 
                    </Border>
                    </ViewCell>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>

Please bear in mind that reverting the changes to don't use styles fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant