예제 #1
0
        private void CreateItemsFromData(System.Collections.IEnumerable dataSource)
        {
            _items = new Collection <DLTagCloudItem>();
            foreach (object data in dataSource)
            {
                DLTagCloudItem item = new DLTagCloudItem();

                if (!String.IsNullOrEmpty(this.DataValueField))
                {
                    item.Value = DataBinder.GetPropertyValue(data, this.DataValueField).ToString();
                }

                if (!String.IsNullOrEmpty(this.DataTextField))
                {
                    item.Text = DataBinder.Eval(data, this.DataTextField, this.DataTextFormatString);
                }

                if (!String.IsNullOrEmpty(this.DataTitleField))
                {
                    item.Title = DataBinder.Eval(data, this.DataTitleField, this.DataTitleFormatString);
                }

                this.Items.Add(item);
            }
        }
예제 #2
0
 internal DLCloudItemEventArgs(DLTagCloudItem item)
 {
     this._item = item;
 }