2017-12-26 7 views
2

Ich versuche, die folgende Ansicht zu erstellen. my viewXaml Display-Karte auf der halben Seite, eine andere Hälfte Informationen in Xamarin Formen

Ich schein nicht, dies zu erreichen, ich versuchte verschiedene Ansätze, aber es hat nicht funktioniert. Ist das in Xamarin-Formen überhaupt möglich? Das ist, was ich habe: Meine Ansicht:

<StackLayout> 
    <local:CustomMap x:Name="customMap" 
        MapType="Satellite" 
        WidthRequest="{x:Static local:App.ScreenWidth}" 
        HeightRequest="{x:Static local:App.ScreenHeight}" /> 

    <ListView x:Name="listviewname" 
       HasUnevenRows="True"> 
     <ListView.ItemTemplate> 
      <DataTemplate> 
       <ViewCell> 
        <StackLayout Padding="20, 10"> 
         <Label Text="{Binding Information}" 
           FontSize="15" 
           HorizontalOptions="Start"/> 
         <Label Text="{Binding More Information}" 
           FontSize="15"/> 
         <Label Text="{Binding MoreInformation}" 
           FontSize="15"/> 
        </StackLayout> 
       </ViewCell> 
      </DataTemplate> 
     </ListView.ItemTemplate> 
    </ListView> 
</StackLayout> 

Aber es zeigt nur meine Karte. Etwas Hilfe wäre willkommen. Danke :)

+0

Versuchen Sie mit einem Raster –

Antwort

1

Sie können Grid verwenden, um die Seite in 2 Segmente zu teilen. etwas wie sollte Sie loslegen:

<Grid> 
    <Grid.RowDefinitions> 
     <RowDefinition Height="*" /> 
     <RowDefinition Height="*" /> 
    </Grid.RowDefinitions> 
    <Grid.ColumnDefinitions> 
     <ColumnDefinition Width="*" /> 
    </Grid.ColumnDefinitions> 
    <maps:Map Grid.Row="0" /> 
    <ListView Grid.Row="1" x:Name="listviewname" HasUnevenRows="True"> 
     <ListView.ItemTemplate> 
      <DataTemplate> 
       <ViewCell> 
        <StackLayout Padding="20, 10"> 
         <Label Text="{Binding Information}" FontSize="15" HorizontalOptions="Start"/> 
         <Label Text="{Binding More Information}" FontSize="15"/> 
         <Label Text="{Binding MoreInformation}" FontSize="15"/> 
        </StackLayout> 
       </ViewCell> 
      </DataTemplate> 
     </ListView.ItemTemplate> 
    </ListView>    
</Grid> 
+0

Das hat für mich funktioniert. Also nochmal Danke @sushihangover –

+0

@IdevDev Kein Problem, froh, dass es geholfen hat. – SushiHangover

Verwandte Themen