Esempio n. 1
0
 private void FeedItemYahooDataTemplate(FeedItemViewModel <YahooItem> item, FeedItemYahooHolder holder,
                                        int position)
 {
     MerchItemYahooHolderTemplate.DataTemplate(item, holder, position);
     holder.ClickSurface.SetOnLongClickListener(new OnLongClickListener(view => HandlePopupMenu(view, item)));
     holder.ClickSurface.SetOnClickCommand(item.NavigateItemWebsiteCommand);
 }
            protected override void SetBindings()
            {
                Bindings.Add(this.SetBinding(() => ViewModel.IsLoading).WhenSourceChanges(() =>
                {
                    LoadingSpinner.Visibility = BindingConverters.BoolToVisibility(ViewModel.IsLoading, ViewStates.Invisible);
                    DetailSection.Visibility  = BindingConverters.BoolToVisibilityInverted(ViewModel.IsLoading, ViewStates.Invisible);

                    if (!ViewModel.IsLoading)
                    {
                        MerchItemYahooHolderTemplate.DataTemplate(ViewModel, this, AdapterPosition);
                        if (Math.Abs(ViewModel.Price - CrawlerConstants.InvalidPrice) < 0.0001)
                        {
                            Price.Text = AppResources.Item_WatchedItem_AuctionEnded;
                            Price.SetTextColor(ThemeManager.RedColour);
                        }
                    }
                }));
            }
Esempio n. 3
0
 private void WatchedItemYahooDataTemplate(WatchedItemViewModel <YahooItem> item, WatchedItemYahooHolder holder, int position)
 {
     MerchItemYahooHolderTemplate.DataTemplate(item, holder, position);
     holder.ClickSurface.SetOnClickCommand(item.NavigateItemWebsiteCommand);
 }