This repository was archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 459
This repository was archived by the owner on May 1, 2024. It is now read-only.
[Bug] SideMenuView not work fine switching from portrait to landscape #924
Copy link
Copy link
Closed
Labels
bugSomething isn't working. Breaky break.Something isn't working. Breaky break.s/unverifiedThis issue needs verification/reproduction by a team member. PRs cannot be accepted/merged.This issue needs verification/reproduction by a team member. PRs cannot be accepted/merged.
Description
Description
I have a Page with a SideMenuView
It has a MainView and a RightMenu
When I tap on the item (it's a CollectioView) I open the Menu
If I move the device in landscape I have this:
Steps to Reproduce
I can give the XML...
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Class="BeltrameLogistica.Page.GestioneBilletta.DettaglioRighePage"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:getbykey="clr-namespace:BeltrameLogistica.Model.WebService.LetteraCarico.GetByKey"
xmlns:resource="clr-namespace:BeltrameLogistica.Resource"
xmlns:result="clr-namespace:BeltrameLogistica.Model.WebService.LocazioneBillette.RicercaGiacenza"
xmlns:viewmodel="clr-namespace:BeltrameLogistica.ViewModel.GestioneBilletta"
xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
x:Name="this"
Title="{x:Static resource:AppResource.DettaglioRighe}"
x:DataType="viewmodel:DettaglioRigheViewModel"
NavigationPage.HasBackButton="False">
<xct:SideMenuView>
<xct:SideMenuView.Triggers>
<DataTrigger
Binding="{Binding IsMenuGiacenzeVisible}"
TargetType="xct:SideMenuView"
Value="true">
<Setter Property="State" Value="RightMenuShown" />
</DataTrigger>
<DataTrigger
Binding="{Binding IsMenuGiacenzeVisible}"
TargetType="xct:SideMenuView"
Value="false">
<Setter Property="State" Value="MainViewShown" />
</DataTrigger>
</xct:SideMenuView.Triggers>
<!-- Videata principale -->
<StackLayout xct:SideMenuView.Position="MainView" Style="{StaticResource MainStackLayoutStyle}">
<!-- CollectionView delle righe dell'ordine -->
<CollectionView
ItemsSource="{Binding SviluppaDettagliDaOrdiniResponse.Item}"
SelectedItem="{Binding SelectedItemDettagli}"
SelectionChangedCommand="{Binding SelectionChangedDettagliCommand}"
SelectionMode="Single">
<CollectionView.ItemsLayout>
<LinearItemsLayout ItemSpacing="30" Orientation="Vertical" />
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="getbykey:Dettagli">
<StackLayout>
<!-- Numero ordine -->
<Grid Style="{StaticResource KeyValueGridStyle}">
<Label Grid.Column="0" Text="{x:Static resource:AppResource.NumeroOrdine}" />
<Label
Grid.Column="1"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding NumeroOrdine}" />
</Grid>
<!-- Articolo -->
<Grid Style="{StaticResource KeyValueGridStyle}">
<Label Grid.Column="0" Text="{x:Static resource:AppResource.CodiceArticolo}" />
<Label
Grid.Column="1"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding DescrizioneArticolo}" />
</Grid>
<!-- Qualità -->
<Grid Style="{StaticResource KeyValueGridStyle}">
<Label Grid.Column="0" Text="{x:Static resource:AppResource.CodiceQualita}" />
<Label
Grid.Column="1"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding CodiceQualita}" />
</Grid>
<!-- Righe -->
<Grid ColumnDefinitions="2*,*,2*,*" RowDefinitions="Auto">
<Label Grid.Column="0" Text="{x:Static resource:AppResource.RigaOrdine}" />
<Label
Grid.Column="1"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding ProgressivoRigaOrdine}" />
<Label Grid.Column="2" Text="{x:Static resource:AppResource.SottorigaOrdine}" />
<Label
Grid.Column="3"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding ProgressivoSottoRigaOrdine}" />
</Grid>
<!-- Fasci -->
<Grid ColumnDefinitions="2*,*,2*,*" RowDefinitions="Auto">
<Label Grid.Column="0" Text="{x:Static resource:AppResource.FasciResidui}" />
<Label
Grid.Column="1"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding FasciResidui}" />
<Label Grid.Column="2" Text="{x:Static resource:AppResource.FasciCaricati}" />
<Entry
Grid.Column="3"
Style="{StaticResource NumericEntryStyle}"
Text="{Binding FasciCaricati}">
<Entry.Behaviors>
<xct:UserStoppedTypingBehavior
Command="{Binding Path=BindingContext.CalcolaTonnellateCaricateCommand, Source={x:Reference Name=this}}"
MinimumLengthThreshold="1"
ShouldDismissKeyboardAutomatically="True"
StoppedTypingTimeThreshold="2000" />
</Entry.Behaviors>
</Entry>
</Grid>
<!-- Tonnellate -->
<Grid ColumnDefinitions="2*,*,2*,*" RowDefinitions="Auto">
<Label Grid.Column="0" Text="{x:Static resource:AppResource.TonnellateResidue}" />
<Label
Grid.Column="1"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding TonnellateResidue}" />
<Label Grid.Column="2" Text="{x:Static resource:AppResource.TonnellateCaricate}" />
<Label
Grid.Column="3"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding TonnellateCaricate}" />
</Grid>
<!-- Fasci allocati -->
<Grid Style="{StaticResource KeyValueGridStyle}">
<Label Grid.Column="0" Text="{x:Static resource:AppResource.FasciAllocati}" />
<Label
Grid.Column="1"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding FasciAllocati}" />
</Grid>
</StackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<!-- Button Inserisci -->
<Button
Command="{Binding InserisciCommand}"
IsVisible="{Binding IsInserisciVisible}"
Text="{x:Static resource:AppResource.Inserisci}" />
<!-- Altri button -->
<StackLayout IsVisible="{Binding IsInserisciVisible, Converter={StaticResource InvertedBoolConverter}}" Spacing="0">
<Grid ColumnDefinitions="*,*" RowDefinitions="Auto">
<Button Command="{Binding DeleteRowsCommand}" Text="{x:Static resource:AppResource.EliminaRighe}" />
<Button Command="{Binding SaveRowsCommand}" Text="{x:Static resource:AppResource.SalvaRighe}" Grid.Column="1"/>
</Grid>
<Button Command="{Binding SaveAllocationsCommand}" Text="{x:Static resource:AppResource.SalvaAllocazioni}" />
</StackLayout>
</StackLayout>
<!-- Menu dx per le giacenze -->
<StackLayout
xct:SideMenuView.MenuGestureEnabled="False"
xct:SideMenuView.Position="RightMenu"
Style="{StaticResource MainStackLayoutStyle}">
<!-- CollectionView per selezionare le locazioni -->
<CollectionView
ItemsSource="{Binding RicercaGiacenzaResponse.Results}"
SelectedItem="{Binding SelectedItemGiacenza}"
SelectionChangedCommand="{Binding SelectionChangedGiacenzaCommand}"
SelectionMode="Single">
<CollectionView.ItemsLayout>
<LinearItemsLayout ItemSpacing="30" Orientation="Vertical" />
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="result:Result">
<StackLayout>
<Grid Style="{StaticResource DoubleKeyValueGridStyle}">
<Label Grid.Column="0" Text="Colata" />
<Label
Grid.Column="1"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding NumeroColataCompleto}" />
<Label Grid.Column="2" Text="Tipo culla" />
<Label
Grid.Column="3"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding CodiceTipoCulla}" />
</Grid>
<Grid Style="{StaticResource DoubleKeyValueGridStyle}">
<Label Grid.Column="0" Text="Locazione" />
<Label
Grid.Column="1"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding CodiceLocazione}" />
<Label Grid.Column="2" Text="Stallo" />
<Label
Grid.Column="3"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding CodiceCulla}" />
</Grid>
<Grid Style="{StaticResource DoubleKeyValueGridStyle}">
<Label Grid.Column="0" Text="Posizione" />
<Label
Grid.Column="1"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding CodicePosizione}" />
<Label Grid.Column="2" Text="Q.tà giacente" />
<Label
Grid.Column="3"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding QuantitaGiacente}" />
</Grid>
</StackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<BoxView
Margin="0,4,0,4"
BackgroundColor="{StaticResource PrimaryLightColor}"
HeightRequest="2" />
<!-- CollectionView per visualizzare le locazioni inserite -->
<CollectionView ItemsSource="{Binding Locazioni}">
<CollectionView.ItemsLayout>
<LinearItemsLayout ItemSpacing="30" Orientation="Vertical" />
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="getbykey:Locazioni">
<!-- SwipeView per eliminare la riga -->
<SwipeView>
<SwipeView.RightItems>
<SwipeItems Mode="Reveal">
<SwipeItemView Command="{Binding Path=BindingContext.DeleteAllocationCommand, Source={x:Reference Name=this}}" CommandParameter="{Binding .}">
<Grid
BackgroundColor="Red"
ColumnDefinitions="*"
RowDefinitions="Auto, Auto"
WidthRequest="80">
<Image Grid.Row="0">
<Image.Source>
<FontImageSource
FontFamily="ionicons"
Glyph=""
Size="40"
Color="White" />
</Image.Source>
</Image>
<Label
Grid.Row="1"
HorizontalOptions="Center"
Text="{x:Static resource:AppResource.Elimina}"
TextColor="White" />
</Grid>
</SwipeItemView>
</SwipeItems>
</SwipeView.RightItems>
<StackLayout>
<StackLayout>
<Grid Style="{StaticResource DoubleKeyValueGridStyle}">
<Label Grid.Column="0" Text="Colata" />
<Label
Grid.Column="1"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding NumeroColataCompleto}" />
<Label Grid.Column="2" Text="Tipo culla" />
<Label
Grid.Column="3"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding CodiceTipoCulla}" />
</Grid>
<Grid Style="{StaticResource DoubleKeyValueGridStyle}">
<Label Grid.Column="0" Text="Locazione" />
<Label
Grid.Column="1"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding CodiceLocazione}" />
<Label Grid.Column="2" Text="Stallo" />
<Label
Grid.Column="3"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding CodiceCulla}" />
</Grid>
<Grid Style="{StaticResource DoubleKeyValueGridStyle}">
<Label Grid.Column="0" Text="Posizione" />
<Label
Grid.Column="1"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding CodicePosizione}" />
<Label Grid.Column="2" Text="Q.tà giacente" />
<Label
Grid.Column="3"
Style="{StaticResource ValueLabelStyle}"
Text="{Binding QuantitaGiacente}" />
</Grid>
</StackLayout>
<Label
FontSize="Title"
HorizontalOptions="Center"
Text="{Binding QuantitaPrelevata, StringFormat='Allocati: {0}'}"
TextColor="{StaticResource PrimaryColor}" />
</StackLayout>
</SwipeView>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<Grid ColumnDefinitions="*,*" RowDefinitions="Auto">
<Button Command="{Binding MenuGiacenzeAnnullaCommand}" Text="{x:Static resource:AppResource.Annulla}" />
<Button
Grid.Column="1"
Command="{Binding MenuGiacenzeConfermaCommand}"
IsEnabled="{Binding Locazioni.Count, Converter={StaticResource IntToBoolConverter}}"
Text="{x:Static resource:AppResource.Conferma}" />
</Grid>
</StackLayout>
</xct:SideMenuView>
</ContentPage>
Expected Behavior
Don't see the overlap
Actual Behavior
I see the overlap
Basic Information
- Version with issue: 1.1.0-preview1014
- Last known good version: unknown
- IDE: Visual Studio 2019 16.8.5
- Platform Target Frameworks:
- iOS:
- Android: 10
- UWP:
- Android Support Library Version:
- Nuget Packages:
- Affected Devices:
Workaround
Reproduction imagery
Reproduction Link
Metadata
Metadata
Assignees
Labels
bugSomething isn't working. Breaky break.Something isn't working. Breaky break.s/unverifiedThis issue needs verification/reproduction by a team member. PRs cannot be accepted/merged.This issue needs verification/reproduction by a team member. PRs cannot be accepted/merged.