Пример #1
0
 /// <summary>
 /// Removes the <paramref name="relatedThingRow"/> from the <see cref="RelatedThings"/> property
 /// </summary>
 /// <param name="relatedThingRow">The <see cref="RelatedThingRowViewModel"/> to remove</param>
 private void RemoveRelatedThing(RelatedThingRowViewModel relatedThingRow)
 {
     if (this.RelatedThings.Remove(relatedThingRow))
     {
         relatedThingRow.Dispose();
     }
 }
Пример #2
0
        /// <summary>
        /// Performs a drop.
        /// </summary>
        /// <param name="dropInfo">
        ///   Information about the drop.
        /// </param>
        public async Task Drop(IDropInfo dropInfo)
        {
            var thing = dropInfo.Payload as Thing;

            if (thing == null || this.RelatedThings.Select(x => x.Thing).Contains(thing))
            {
                return;
            }

            var row = new RelatedThingRowViewModel(thing, this.RemoveRelatedThing);

            this.RelatedThings.Add(row);
        }
Пример #3
0
 /// <summary>
 /// Removes the <paramref name="relatedThingRow"/> from the <see cref="RelatedThings"/> property
 /// </summary>
 /// <param name="relatedThingRow">The <see cref="RelatedThingRowViewModel"/> to remove</param>
 private void RemoveRelatedThing(RelatedThingRowViewModel relatedThingRow)
 {
     this.RelatedThings.RemoveAndDispose(relatedThingRow);
 }