Exemple #1
0
        /// <summary>
        /// Two comboboxdataitems are equal if the underlying data's
        /// guids are equal.
        /// </summary>
        public bool Equals(LstbxDataItem other)
        {
            if (other == null)
            {
                return false;
            }

            return (_data.guid == other._data.guid);
        }
Exemple #2
0
        /// <summary>
        /// Clones the given item and resets header to match.
        /// </summary>
        /// <param name="item">The item to copy.</param>
        public LstbxDataItem(LstbxDataItem item)
        {
            _data = item._data;

            //Sets the header for the element according to the name.
            if (item != null && item.GetItem() != null)
            {
                Content = (string)item.GetItem().GetData("name");
            }
            else
            {
                Content = String.Empty;
            }
        }