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

DropDownList in Xamarin.Forms

$
0
0

Hi all,

I'm going to create new custom DropDownList in Xamarin.Forms. I created a new ContentView which contains very basic controls.

  1. Button Title (HeightRequest = 50)
  2. ListView

When click on the Button Title -> ListView will be toggled displaying (show/hide)

2 controls wrapped in an AbsoluteLayout (HeightRequest = 50).

I'm having Issues

-> When I click on the Button Title -> The ListView displayed but cannot clickable because the AbsoluteLayout has HeightRequest = 50.
-> When I put them into a StackLayout

                    <StackLayout Grid.Row="0" Orientation="Vertical">
                        <customDropDown:SimpleDropDown x:Name="ddl01"></customDropDown:SimpleDropDown>
                        <customDropDown:SimpleDropDown x:Name="ddl02"></customDropDown:SimpleDropDown>
                    </StackLayout>

When the ddl01 shown. It's z-index smaller than the ddl02. So the ListView of ddl01 is under ddl02.

-> Last thing, when I click ddl02 or any other control on the screen. How can I hide the ListView of ddl01 when it's showing?

Thanks & best regards,


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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