Xamarin.Forms OnPlatform RowDefinition.Height is not working correctly

renzskarenzska USMember ✭✭
edited June 2016 in Prerelease & Betas

(Can this be moved to the Xamarin.Forms forum? I determined it was no longer a XAML Previewer issue.)

I have the following XAML which does not change the RowDefinition Height when I change the values below. It always renders the minimum height for content on iOS.

<RowDefinition>
                    <RowDefinition.Height>
                        <OnPlatform
                            x:TypeArguments="x:Double"
                            iOS="20"
                            Android="0"
                            WinPhone="0" /> <!-- OnPlatform and OnIdiom Aren't Working -->
                        <!--<OnIdiom x:TypeArguments="x:Double">
                    <OnIdiom.Phone>20</OnIdiom.Phone>
                    <OnIdiom.Tablet>40</OnIdiom.Tablet>
                </OnIdiom>-->
                    </RowDefinition.Height>
                </RowDefinition>

Any help would be appreciated.

Regards,

John

Tagged:

Best Answer

Answers

  • _Jai_Jai USMember ✭✭

    @renzska said:
    I fixed it by changing the

    x:TypeArguments="x:Double"
    

    to

    x:TypeArguments="GridLength"
    

    Yeah, it's confusing setting a Height to a type of "GridLength", but at least I can move forward now.

    It worked for me thank you.

Sign In or Register to comment.