如何在xamarin中对Imagecell进行圆角处理?

时间:2016-08-23 14:15:23

标签: c# listview xamarin datatemplate

我试图在xamarin的ImageCell上找到圆角。我怎么能做到这一点?

    <Grid Padding="10">
<Grid.RowDefinitions>
  <RowDefinition Height="Auto"/>
  <RowDefinition Height="Auto"/>
  <RowDefinition Height="Auto"/>
  <RowDefinition Height="*"/>
</Grid.RowDefinitions>
<SearchBar Grid.Row="0" x:Name="searchBar" Placeholder="Search" SearchCommand="{Binding SearchCommand}" Text="{Binding SearchText}"></SearchBar>
<ListView Grid.Row="3"  x:Name="listView" ItemsSource="{Binding LearningItems}" HasUnevenRows="True" IsVisible="{Binding LearningItemListIsVisible}" BackgroundColor="Silver" Footer="{Binding .}">
  <ListView.ItemTemplate>
    <DataTemplate>
      <ImageCell Text="{Binding LearningItem.Name}" TextColor="Black" ImageSource="{Binding LearningItem.ImageUrl}" Command="{Binding LearningItemPressedCommand}"></ImageCell>
    </DataTemplate>
  </ListView.ItemTemplate>
  <ListView.FooterTemplate>
    <DataTemplate>
      <StackLayout  BackgroundColor="White">
        <Label Text="{Binding CopyrightText}" FontSize="8"></Label>
        <Image x:Name="creativeCommons" HorizontalOptions="Center" Source="(iOS: ImageSource.FromFile('creative_commons_88x31.png'), Android: ImageSource.FromFile('creative_commons_88x31.png'), WinPhone: ImageSource.FromFile('Images/creative_commons_88x31.png'))" />
        <Label Text="{Binding CopyrightFinePrint}" FontSize="9"></Label>
        <Image HorizontalOptions="CenterAndExpand" Source="(iOS: ImageSource.FromFile('cowBurst.png'), Android: ImageSource.FromFile('cowBurst.png'), WinPhone: ImageSource.FromFile('Images/cowBurst.png'))" />
      </StackLayout>
    </DataTemplate>
  </ListView.FooterTemplate>
</ListView>

0 个答案:

没有答案