Reputation: 173
I want to make a custom dropdown as below.
once user clicked on the frame I need to make a dropdown as below by expanding frame height.
<Frame CornerRadius="8" BackgroundColor="{StaticResource LightAirColor}" Padding="10,4,10,4">
<TableView>
<TableSection>
<ViewCell Tapped="OnSortingPaneTapped">
<StackLayout Orientation="Vertical">
<StackLayout Orientation="Horizontal">
<Label Text="Arrange By" TextColor="{StaticResource DarkColor}" FontSize="{DynamicResource FontSize16}"/>
<Label Text="Date/Time" TextColor="{StaticResource NavigationPrimary}" FontSize="{DynamicResource FontSize16}"/>
</StackLayout>
</StackLayout>
</ViewCell>
<ViewCell>
<StackLayout Orientation="Horizontal">
<Label Text="Episode" TextColor="{StaticResource NavigationPrimary}" FontSize="{DynamicResource FontSize16}"/>
</StackLayout>
</ViewCell>
<ViewCell Tapped = "SortJournalByDate">
<StackLayout Orientation="Horizontal" VerticalOptions="Center">
<Label Text="Date/Time" TextColor="{StaticResource NavigationPrimary}" FontSize="{DynamicResource FontSize16}"/>
</StackLayout>
</ViewCell>
</TableSection>
</TableView>
</Frame>
I tried using heightRequest, forceLayout() but no luck. How can I change the height from code behind when the user click on the frame?
Upvotes: 1
Views: 2107
Reputation: 409
you can use binding for your height request and change it in the view model.
also you can use syncfusion combo box to reach that purpose.
another thing if you couldnt change height you can use visible to invisible it
Upvotes: 1