Skip to content

Instantly share code, notes, and snippets.

@Redth
Created February 2, 2021 17:07
Show Gist options
  • Save Redth/b54cfe7ec28dca7a96b10fccfcf8790b to your computer and use it in GitHub Desktop.
Save Redth/b54cfe7ec28dca7a96b10fccfcf8790b to your computer and use it in GitHub Desktop.
<Grid ColumnDefinitions="*,*" RowDefinitions="*,Auto">
<Button Text="Abort"
Grid.Column="0"
Grid.Row="1"
BackgroundColor="Blue"
TextColor="White"
Margin="10, 0, 5, 15"
CornerRadius="4" />
<Button Text="OK"
Grid.Column="1"
Grid.Row="1"
Margin="5,0,10,15"
BackgroundColor="Blue"
TextColor="White"
CornerRadius="4" />
<ListView
Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0" Grid.RowSpan="2"
CachingStrategy="RecycleElement"
VerticalOptions="FillAndExpand">
<ListView.Header>
<Grid RowDefinitions="Auto, Auto" Padding="10, 15">
<Label Grid.Row="0" Text="This is the display text" HorizontalTextAlignment="Center" />
<SearchBar Placeholder="Search"
Grid.Row="1"
PlaceholderColor="Gray"
Text=""
TextColor="Black"
BackgroundColor="LightGray"
HeightRequest="40">
</SearchBar>
</Grid>
</ListView.Header>
<ListView.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>One</x:String>
<x:String>Two</x:String>
<x:String>Three</x:String>
<x:String>Four</x:String>
<x:String>Five</x:String>
<x:String>Six</x:String>
<x:String>Seven</x:String>
<x:String>Eight</x:String>
<x:String>Nine</x:String>
<x:String>Ten</x:String>
<x:String>Eleven</x:String>
<x:String>Twelve</x:String>
<x:String>Thirteen</x:String>
<x:String>Fourteen</x:String>
<x:String>Fifteen</x:String>
<x:String>Sixteen</x:String>
<x:String>Seventeen</x:String>
<x:String>Eighteen</x:String>
<x:String>Nineteen</x:String>
<x:String>Twenty</x:String>
<x:String>Twentyone</x:String>
<x:String>Twentytwo</x:String>
<x:String>Twentythree</x:String>
<x:String>Twentyfour</x:String>
<x:String>Twentyfive</x:String>
</x:Array>
</ListView.ItemsSource>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Label Text="{Binding .}" VerticalTextAlignment="Center" Margin="10" />
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment