private void ContactInit() { var emptyTextView = FindViewById(12); var emptyTextView2 = FindViewById(13); if (emptyTextView == null && emptyTextView2 == null) { var contactTextView = new TextView(Context); contactTextView.Id = 12; var layoutParamTextView = new LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent); layoutParamTextView.Gravity = GravityFlags.CenterVertical; layoutParamTextView.LeftMargin = AccessResources.Instance.SizeOf20Dip(); contactTextView.Text = Resources.GetString(Resource.String.alert_contactEmpty); contactTextView.SetTextColor(Color.ParseColor(Resources.GetString(Resource.Color.textColorHint))); contactTextView.SetTextSize(ComplexUnitType.Dip, 16); contactTextView.LayoutParameters = layoutParamTextView; SetBackgroundColor(Color.Transparent); contactTextView.Click += (o, e) => { EmptyClick?.Invoke(null, null); }; AddView(contactTextView); } }
private void OnEmptyClick(MouseEventArgs e) { switch (e.Clicks) { case 1: EmptyClick?.Invoke(e); break; case 2: EmptyDoubleClick?.Invoke(e); break; default: break; } SelectedItems.Clear(); }
private void SetTappedCommand() { _pullUpLoadMoreControl.Tapped += (s, e) => { if (IsShowPullUpLoadMore && !ListViewRequestDataContext.IsPullUpLoadMoreStatus && null != PullUpLoadMore) { ListViewRequestDataContext.IsPullUpLoadMoreStatus = true; PullUpLoadMore.Invoke(this, null); } }; _emptyControl.Tapped += (s, e) => { if (IsShowEmpty && null != EmptyClick) { EmptyClick.Invoke(this, null); } }; }