/// <summary>
        /// Initializes a new instance of the class <see cref="ItemsPlacementConnectorBase"/>.
        /// </summary>
        /// <param name="flags">Configuration flags of the created <see cref="ItemsPlacementConnector"/>.</param>
        public ItemsPlacementConnectorBase(ItemsPlacementConnectorFlags flags)
        {
            this._flags = flags;

            this._viewsCollectionView = new ListCollectionView(this._views);
            this._viewsCollectionView.CurrentChanged += this.ViewsCollectionView_CurrentChanged;
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the class <see cref="ItemsPlacementConnector"/>.
        /// </summary>
        /// <param name="viewModelViewMatcher">The service for a connected object's view lookup.</param>
        /// <param name="connectedDragDrop">The service for dragging an object connected to the user interface.</param>
        /// <param name="flags">Configuration flags of the created <see cref="ItemsPlacementConnector"/>.</param>
        public ItemsPlacementConnector(
            IViewModelViewMatcher viewModelViewMatcher,
            IConnectedDragDrop connectedDragDrop,
            ItemsPlacementConnectorFlags flags)
            :
            base(flags)
        {
            Contract.Requires <ArgumentNullException>(viewModelViewMatcher != null);
            Contract.Requires <ArgumentNullException>(connectedDragDrop != null);

            this._viewModelViewMatcher = viewModelViewMatcher;
            this._connectedDragDrop    = connectedDragDrop;
        }
 private ItemsPlacementConnector CreateTestObject(ItemsPlacementConnectorFlags flags = ItemsPlacementConnectorFlags.Default)
 {
     return(new ItemsPlacementConnector(this._viewMatcher, this._connectedDragDrop, flags));
 }
 /// <summary>
 /// Checks whether the given configuration flag is set.
 /// </summary>
 /// <param name="flag">The configuration flag to check.</param>
 /// <returns>true, if the given flag is set; false otherwise.</returns>
 protected bool IsFlagSet(ItemsPlacementConnectorFlags flag)
 {
     return((this._flags & flag) == flag);
 }