|
public class ListModel : INotifyPropertyChanged
{
private int scoreValue;
private List<ITransformation> transformations;
public ListModel()
{
Tranformations = new List<ITransformation>();
}
public int ScoreValue
{
get { return scoreValue; }
set { scoreValue = value; this.OnPropertyChanged("ScoreValue"); }
}
public List<ITransformation> Tranformations
{
get { return transformations; }
set { transformations = value; this.OnPropertyChanged("Tranformations"); }
}
} |
|
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
private void ContentPage_Appearing(object sender, EventArgs e)
{
var specialities = new ObservableCollection<ListModel>();
for (int i = 0; i < 20; i++)
{
var item = new ListModel() { ScoreValue = i };
item.Tranformations.Add(new BlurredTransformation() { Radius = 20 });
specialities.Add(item);
}
speBubbles.ItemsSource = specialities;
}
} |
|
<border:SfBorder x:Name="border" BorderColor="Blue" HeightRequest="{ Binding Source={ x:Reference Root }, Path=HeightRequest }" WidthRequest="{ Binding Source={ x:Reference Root }, Path=WidthRequest }">
<Grid HorizontalOptions="Fill" VerticalOptions="Fill">
<border:SfBorder x:Name="borderLabelScore" BackgroundColor="White" HorizontalOptions="Center" VerticalOptions="End" CornerRadius="20" Opacity="0.6">
<Grid>
<ffimageloading:CachedImage x:Name="img" HorizontalOptions="Center" VerticalOptions="Center"
WidthRequest="300" HeightRequest="300"
DownsampleToViewSize="true"
Source = "http://loremflickr.com/600/600/nature?filename=simple.jpg" Transformations="{Binding Tranformations}">
</ffimageloading:CachedImage>
...
</Grid>
</border:SfBorder>
</Grid>
<border:SfBorder.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</border:SfBorder.GestureRecognizers>
</border:SfBorder> |