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

{Binding Source={x:Reference this}, Path=IsBusy} Doesn't work #35

Open
georgeemr opened this issue May 6, 2024 · 0 comments
Open

{Binding Source={x:Reference this}, Path=IsBusy} Doesn't work #35

georgeemr opened this issue May 6, 2024 · 0 comments

Comments

@georgeemr
Copy link

If I try to use a global IsBusy for example on a CollectionView there's no effect.
To make it work I need to add a IsBusy variable for each item.
Is this on purpose? Or is there a way to make it work?

<CollectionView HeightRequest="110"
                HorizontalScrollBarVisibility="Never"
                ItemsSource="{Binding Source={x:Reference this}, Path=ItemsSource}">
    <CollectionView.ItemTemplate>
        <DataTemplate x:DataType="model:ItemRound">
            <Grid RowDefinitions="Auto,Auto,*"
                  Margin="5,0,0,0">
                <Border Padding="0"
                        WidthRequest="70"
                        HeightRequest="70"
                        StrokeShape="RoundRectangle 100"
                        Stroke="Transparent"
                        StrokeThickness="1"
                        BackgroundColor="{StaticResource ColorOnDarkBackground}"
                        VerticalOptions="Start"
                        HorizontalOptions="Start"
                        sk:Skeleton.IsBusy="{Binding Source={x:Reference this}, Path=IsBusy}"
                        sk:Skeleton.BackgroundColor="{StaticResource ShimmerColor}"
                        sk:Skeleton.Animation="{sk:DefaultAnimation Fade}">
                    <Image Source="{Binding Image}"
                           Aspect="AspectFill"
                           sk:Skeleton.Hide="True"
                           sk:Skeleton.IsBusy="{Binding Source={x:Reference this}, Path=IsBusy}">
                    </Image>
                </Border>               
            </Grid>
        </DataTemplate>
    </CollectionView.ItemTemplate>   
</CollectionView>
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