maintain image size in different screen resolutions

KimJensenKimJensen USMember ✭✭

I have an app that have 6 icons on the main screen, in the XAML I have the image set like this.

<StackLayout 
                HorizontalOptions="FillAndExpand"
                VerticalOptions="EndAndExpand">  
                <AbsoluteLayout x:Name="menuLayout" HorizontalOptions="FillAndExpand" 
                    VerticalOptions="FillAndExpand">
                    <!--AbsoluteLayout.LayoutBounds="0.5, 0.9, 0.20, 0.20-->
                    <Image x:Name="bars" Source="bars" 
                        AbsoluteLayout.LayoutBounds="0.5, 0.9, 0.25, 0.25" 
                        AbsoluteLayout.LayoutFlags="All" >
                        <Image.GestureRecognizers>
                            <TapGestureRecognizer
                                Tapped="Menu_Tapped"
                                Command="{Binding MenuClicked}"/>
                        </Image.GestureRecognizers>
                    </Image>

I added @x2 and @x3 in the resources, but the icon do not get larger when on a phone with a higher resolution.

Is there a way to make it use the larger images or resize when the resolution is higher?

Thanks,
Kim

Sign In or Register to comment.