tiger4589 / Xamarin.Forms-CardView

A Package to create a CardView using Xamarin.Forms that works on the three platforms (Android, iOS, UWP)
MIT License
66 stars 16 forks source link

Default width and height request #2

Closed cahyo16 closed 6 years ago

cahyo16 commented 7 years ago

Hi there,

I just found some issue in this module related for Height Request and Width Request. By default this module given match_parent value like in Android for Height Request and Width Request. It's bother when we want to use warp_content value like in Android for Height Request and Width Request. But when i use the following approach it's fine

<cardView:CardView
    CardViewHeightRequest="-1"
    HorizontalOptions="Start">
    <cardView:CardView.CardViewContent>
        <StackLayout Orientation="Vertical">
            <Label Text="What about an image?"></Label>
            <Image Source="icon.png"></Image>
        </StackLayout>
    </cardView:CardView.CardViewContent>
</cardView:CardView>

i only added CardViewHeightRequest="-1" and HorizontalOptions="Start".

When i see the source code in CardViewHeightRequestProperty section please change the default value from 300 become -1 and set HorizontalOptions default value to Start.

Thanks, Cahyo

tiger4589 commented 7 years ago

Hello Cahyo, thank you for the interest in my small and jealous component. I am sorry for this late reply, I was having troubles in my home network connection and I just got it back. I will be working on the issues that you posted which I can fix.