public void Set(string name, string description, string avatarUrl) { ShowcaseNameLabel.Text = name; ShowcaseDescriptionLabel.Text = description; if (avatarUrl == null) { ShowcaseImageView.Image = null; } else { try { ShowcaseImageView.SetImage(new NSUrl(avatarUrl), Images.UnknownUser, (img, err, type, imageUrl) => { if (img == null || err != null) { return; } if (type == SDImageCacheType.None) { ShowcaseImageView.Image = Images.UnknownUser; BeginInvokeOnMainThread(() => UIView.Transition(ShowcaseImageView, 0.25f, UIViewAnimationOptions.TransitionCrossDissolve, () => ShowcaseImageView.Image = img, null)); } }); } catch {} } }
void ReleaseDesignerOutlets() { if (ShowcaseDescriptionLabel != null) { ShowcaseDescriptionLabel.Dispose(); ShowcaseDescriptionLabel = null; } if (ShowcaseImageView != null) { ShowcaseImageView.Dispose(); ShowcaseImageView = null; } if (ShowcaseNameLabel != null) { ShowcaseNameLabel.Dispose(); ShowcaseNameLabel = null; } }