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

Indicator view does not update using Visual states #13343

Open
SarthakB26 opened this issue Feb 15, 2023 · 2 comments
Open

Indicator view does not update using Visual states #13343

SarthakB26 opened this issue Feb 15, 2023 · 2 comments
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@SarthakB26
Copy link

SarthakB26 commented Feb 15, 2023

Description

Setting Indicator view image source which is set using Datatemplate using VisualStates Selected and Unselected State doesn't update Image source

I am trying to migrate below simple Xamarin app to MAUI

https://github.com/kphillpotts/Fishing

Steps to Reproduce

You can use below code which copied as it is from Indicator view documentation

<CarouselView
                Grid.Row="0"
                Grid.RowSpan="2"
                IndicatorView="indicatorView"
                ItemsSource="{Binding Items}">
                <CarouselView.ItemTemplate>
                    <DataTemplate x:DataType="models:OnboardingModel">
                        <Grid RowDefinitions="1.5*, 1*" RowSpacing="0">
                            <Image Aspect="AspectFill" Source="{Binding Image}" />
                            <StackLayout Grid.Row="1" Spacing="0">
                                <Label
                                    FontFamily="BoldFont"
                                    LineHeight=".9"
                                    Style="{StaticResource OnboardingHeader}"
                                    Text="{Binding Title}" />
                                <Label
                                    FontFamily="SemiBoldFont"
                                    FontSize="16"
                                    MaxLines="2"
                                    Style="{StaticResource OnboardingContent}"
                                    Text="{Binding Content}" />
                            </StackLayout>
                        </Grid>
                    </DataTemplate>
                </CarouselView.ItemTemplate>
            </CarouselView>
            



<IndicatorView
                    x:Name="indicatorView"
                    HorizontalOptions="Start"
                    IndicatorColor="Transparent"
                    SelectedIndicatorColor="Transparent">
                    <IndicatorView.IndicatorTemplate>
                        <DataTemplate>
                            <Image Source="unselectedindicator" Style="{StaticResource IndicatorStyle}" />
                        </DataTemplate>
                    </IndicatorView.IndicatorTemplate>
                </IndicatorView>
                
                
                
 <Style x:Key="IndicatorStyle" TargetType="Image">
            <Setter Property="VisualStateManager.VisualStateGroups">
                <VisualStateGroupList>
                    <VisualStateGroup x:Name="CommonStates">
                        <VisualState x:Name="Normal">
                            <VisualState.Setters>
                                <Setter Property="Source" Value="unselectedindicator.png" />
                            </VisualState.Setters>
                        </VisualState>
                        <VisualState x:Name="Selected">
                            <VisualState.Setters>
                                <Setter Property="Source" Value="selectedindicator.png" />
                            </VisualState.Setters>
                        </VisualState>
                    </VisualStateGroup>
                </VisualStateGroupList>
            </Setter>
        </Style>


Link to public reproduction project repository

https://github.com/kphillpotts/Fishing

Version with bug

6.0.312

Last version that worked well

6.0.312

Affected platforms

Android

Affected platform versions

All android versions

Did you find any workaround?

Not yet

Relevant log output

No response

@SarthakB26 SarthakB26 added the t/bug Something isn't working label Feb 15, 2023
@jsuarezruiz jsuarezruiz added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label Feb 15, 2023
@rachelkang rachelkang added this to the Backlog milestone Feb 15, 2023
@ghost
Copy link

ghost commented Feb 15, 2023

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@homeyf homeyf added the s/triaged Issue has been reviewed label Jul 31, 2023
@homeyf
Copy link

homeyf commented Jul 31, 2023

Verified this issue with Visual Studio Enterprise 17.7.0 Preview 4.0. Can repro on android platform with sample code.
https://github.com/kphillpotts/Fishing
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants