コード例 #1
0
        protected override object ConvertValue(object newValue)
        {
            List <ItemType> selectedItems = new List <ItemType>();
            var             vals          = newValue.ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

            selectedItems.AddRange(Items.Where(i => vals.Any(v => v == GetItemKey(i))));

            return(vals.ToList().Select(value => (ValueType)SemDataSelectControlHelper <ItemType, ValueType> .ConvertValue(value, Items, ItemKey, ValueSelector)).ToList());
        }
コード例 #2
0
 protected ItemType GetItemFromValue(ValueType value) => SemDataSelectControlHelper <ItemType, ValueType> .GetItemFromValue(value, Items, ValueSelector);
コード例 #3
0
 protected override string GetItemKey(ItemType item) => SemDataSelectControlHelper <ItemType, ValueType> .GetItemKey(item, Items, ItemKey);
コード例 #4
0
 protected override object ConvertValue(object newValue) => SemDataSelectControlHelper <ItemType, ValueType> .ConvertValue(newValue, Items, ItemKey, ValueSelector);