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

stack layout and toolbar in one screen

$
0
0

Can I add a cross-platform toolbar to a stack layout in xaml?
Here is my code. It works fine but does not display the toolbar..

<?xml version="1.0" encoding="UTF-8"?>

<ContentPage.ToolbarItems>


</ContentPage.ToolbarItems>
<ContentPage.Content>

    <ListView x:Name="list" ItemsSource="{Binding Blogs}"  ItemTapped="OnItemSelected">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <ViewCell>
                        <ViewCell.View>
                        <StackLayout Orientation="Vertical" HorizontalOptions="StartAndExpand"  VerticalOptions="CenterAndExpand">
                            <Label Text="{Binding name}" VerticalOptions="CenterAndExpand" Font="12" />


                            </StackLayout>
                        </ViewCell.View>
                    </ViewCell>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>

</ContentPage.Content>


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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