xamarin/Xamarin.Forms
[Bug] Replacing Menu Page's Listview with CollectionView in Master Detail Page - overlap with status bar on iOS
開放
#7,634 建立於 2019年9月23日
a/collectionviewe/5 :clock5:help wantedp/iOS 🍎t/bug :bug:up-for-grabs
倉庫指標
- 星標
- (5,644 顆星)
- PR 合併指標
- (30 天內沒有已合併 PR)
描述
#Description Menu items getting shifted up and overlapped by status bar on iOS in Master Detail Page application.
Steps to Reproduce
- Create a new Xamarin.Forms application and select Master Detail Page
- Replace ListView with CollectionView in MenuPage.xaml
<CollectionView x:Name="ListViewMenu" SelectionMode="Single">
<CollectionView.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Item 1</x:String>
<x:String>Item 2</x:String>
</x:Array>
</CollectionView.ItemsSource>
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10">
<Label Text="{Binding Title}" d:Text="{Binding .}" FontSize="20"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
- Replace ListviewMenu.ItemSelected event handler in MenuPage.xaml.cs:
ListViewMenu.SelectionChanged += async (sender, e) =>
{
if (e.CurrentSelection.Count == 0)
return;
var id = (int)((HomeMenuItem)e.CurrentSelection.First()).Id;
await RootPage.NavigateFromMenu(id);
};
Expected Behavior
Before replacement:
Actual Behavior
After replacement:
Basic Information
- Version with issue: 4.3.0.819712-pre2
- IDE: Visual Studio 16.2.5
- Platform Target Frameworks:
- iOS: 12.4