Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

Image keep resizing

$
0
0

Hi there, I'm trying to position the image into the middle of the grid and yet every time I added the property VerticalOptions="Center" and HorizontalsOptions="Center" the image is keep resizing itself to really small size. Can someone point out what I did wrong please? Thank you!

<ContentView x:Name="Profile" VerticalOptions="FillAndExpand" BackgroundColor="#E3E3E3">
    <ScrollView>
        <StackLayout Orientation="Vertical" Spacing="5" Padding="25,10,25,10" VerticalOptions="FillAndExpand">
            <Grid Padding="2" BackgroundColor="#00CCFF" RowSpacing="10" >
                <BoxView BackgroundColor="White" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan ="2" Grid.RowSpan="9"/>
                <Image Source="fullName_icon@30.png" Aspect="Fill"  Grid.Row="1" Grid.Column="0" />
                <Label Text="Name:" Style="{StaticResource ContentHeading}" Grid.Row="1" Grid.Column="1"   />
                <Label Text="{Binding FullName}" Style="{StaticResource Content}" Grid.Row="1" Grid.Column="1" />
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="50" />
                <ColumnDefinition Width="2*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="60" />
            </Grid.RowDefinitions>
            </Grid>
        </StackLayout> 
    </ScrollView> 
</ContentView>

I have included 2 screenshots of the result:

<Image Source="fullName_icon@30.png" Aspect="Fill" Grid.Row="1" Grid.Column="0" />
image

<Image Source="fullName_icon@30.png" Aspect="Fill" Grid.Row="1" Grid.Column="0" VerticalOptions="Center" HorizontalOptions="Center" />
image


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>