// This file is part of the Lobster.Components library // Copyright: Andreas Raczek // This file is published under the The Code Project Open License (CPOL) // See the file "CPOL.html" for the full license governing this code. using System.ComponentModel; namespace Lobster.Components.Collections.Joiner { /// <summary> /// If the output type for a CollectionJoiner is derived from /// this interface, the members presented here are automatically /// filled. /// </summary> public interface IItemPositionInfo : INotifyPropertyChanged { /// <summary> /// Delivers the index of the item in its /// collection in CollectionJoiner.Collections. The index /// is 0-based. /// </summary> int X { get; set; } /// <summary> /// Delivers the index of this items collection /// in CollectionJoiner.Collections. The index is /// 0-based. /// </summary> int Y { get; set; } } public class ItemPositionInfo : ChangeNotifyingObject, IItemPositionInfo { private int x; public int X { get { return x; } set { if (value != x) { x = value; OnPropertyChanged("X"); } } } private int y; public int Y { get { return y; } set { if (value != y) { y = value; OnPropertyChanged("Y"); } } } } public class ItemBox : ItemPositionInfo { public object Item { get; set; } } public class ItemBox<T> : ItemPositionInfo { public T Item { get; set; } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)