Forum Xamarin.Forms

Xamarin how to manually set ContentView StackLayout size

oscsavoscsav Member ✭✭
edited September 2018 in Xamarin.Forms

Hello,

I have a problem with my ContentView. I want to manually define the size of the ContentView (elements are in a StackLayout).

Here is the XAML StackLayout definition :

<ContentView.Content>

    <StackLayout BackgroundColor="White" Spacing="10" VerticalOptions="Fill" Padding="15,15,15,15">
        <ContentPage.Resources>
            <ResourceDictionary>
                <local:Converter x:Key="BoolToImageConverter"/>
            </ResourceDictionary>
        </ContentPage.Resources>

        <!-- Titre de la view et sous-titre en cas d'erreur lors de la recherche des Moxa -->
        <Label HorizontalTextAlignment="Center" VerticalTextAlignment="End" FontAttributes="Bold" FontSize="18" Text="XCOM-RS232i Found" />
        <Label HorizontalTextAlignment="Center" FontSize="14" TextColor="Red" Text="{Binding FoundInfo}" />

...

I want the ContentView to be bigger.

Can anyone help me ?

Best Answer

Answers

Sign In or Register to comment.