/// <summary> /// Raises the element property changed event. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">E.</param> protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) { base.OnElementPropertyChanged(sender, e); var extendedListView = Element as ExtendedListView; if (extendedListView == null) return; if (e.PropertyNameMatches(() => extendedListView.ShowEmptyCells)) SetShowEmptyCells(extendedListView); if (e.PropertyNameMatches(() => extendedListView.AlwaysBounceVertical)) SetAlwaysBounceVertical(extendedListView); }
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) { base.OnElementPropertyChanged(sender, e); var imageElement = (ExtendedImage)Element; if (e.PropertyNameMatches(() => imageElement.TintColor) || e.PropertyNameMatches(() => Element.Source)) SetTintColor(imageElement.TintColor); if (e.PropertyNameMatches(() => imageElement.ImageLabelText) || e.PropertyNameMatches(() => imageElement.LabelColor)) { SetLabelDetails(imageElement); BuildFallbackImage(); } if (e.PropertyNameMatches(() => imageElement.Circular)) SetCircular(imageElement); }
private void ExtendedCellOnPropertyChanged(object sender, PropertyChangedEventArgs e) { var extendedCell = (ExtendedViewCell) sender; if (!e.PropertyNameMatches(() => extendedCell.ShowDisclosure)) return; UITableViewCell cell; if (!_cellMappings.TryGetValue((ExtendedViewCell) sender, out cell)) return; try { SetDiscolosure(extendedCell, cell); } catch (Exception ex) { Debug.WriteLine("Failed to update cell: " + ex.Message); } }
private void ViewModelOnPropertyChanged(object sender, PropertyChangedEventArgs e) { var busy = BindingContext as IBusy; if (busy == null) return; if (e.PropertyNameMatches(() => busy.IsBusy)) { _opacityGrid.IsVisible = busy.IsBusy; _activityFrame.IsVisible = busy.IsBusy; _activityIndicator.IsRunning = busy.IsBusy; } if (e.PropertyNameMatches(() => busy.BusyMessage)) _activityLabel.Text = busy.BusyMessage; }