Skip to content

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

@georgeemr

Description

@georgeemr

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions