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

Border inside collectionview not showing #19508

Closed
11622191 opened this issue Dec 19, 2023 · 1 comment
Closed

Border inside collectionview not showing #19508

11622191 opened this issue Dec 19, 2023 · 1 comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/android 🤖 t/bug Something isn't working

Comments

@11622191
Copy link

Description

When I insert the 'border' element within a DataTemplate related to a CollectionView and execute a command to populate the data list, the 'border' element is not displayed.

However, if I use a 'frame,' it is displayed correctly

CollectionView.Issue.mp4

.

Steps to Reproduce

Install nuget propertychange.fody

Create a file MainPage.xaml

<Frame
    BackgroundColor="Green">
    <ScrollView>
        <VerticalStackLayout>
            <Button 
                Text="CLICKME"
                Pressed="Button_Pressed"/>
            <CollectionView
       SelectionMode="Single"
       ItemsSource="{Binding List}">
                <CollectionView.ItemTemplate>
                    <DataTemplate>
                        <Frame
                        BackgroundColor="Beige">
                            <Label
                            Text="{Binding .}"></Label>
                        </Frame>
                    </DataTemplate>
                </CollectionView.ItemTemplate>
            </CollectionView>

        </VerticalStackLayout>
    </ScrollView>
</Frame>

MainPage.xaml.cs

using PropertyChanged;

namespace TestApp
{
[AddINotifyPropertyChangedInterface]
public partial class MainPage : ContentPage
{
int count = 0;
public List List { get; set; }
public MainPage()
{
InitializeComponent();
this.BindingContext = this;

    }

    private void Button_Pressed(object sender, EventArgs e)
    {
        List = new List<int>();
        for (int i = 0;i<=10;i++)
        {
            List.Add(i);
        }
    }
}

}

Link to public reproduction project repository

No response

Version with bug

8.0.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 14

Did you find any workaround?

No response

Relevant log output

No response

@11622191 11622191 added the t/bug Something isn't working label Dec 19, 2023
@11622191
Copy link
Author

If the collectionview is inside a frame border will not showing.. removed the frame it's all right,

@github-actions github-actions bot locked and limited conversation to collaborators Jan 19, 2024
@samhouts samhouts added platform/android 🤖 area-controls-collectionview CollectionView, CarouselView, IndicatorView labels Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants