Example #1
0
        /// <summary>
        /// Create new manipulation processor
        /// </summary>
        /// <remarks>
        /// Call the <see cref="ProcessDown"/>, <see cref="ProcessMove"/>, <see cref="ProcessUp"/> to feed the processor.
        /// Register on <see cref="ManipulationStarted"/>, <see cref="ManipulationDelta"/> and <see cref="ManipulationCompleted"/>
        /// to handle manipulation events
        /// </remarks>
        /// <param name="supportedManipulations">Activate specific manipulation (scale, translate, rotate)</param>
        public ManipulationProcessor(ProcessorManipulations supportedManipulations)
        {
            _comManipulationProcessor = new ManipulationInterop.ManipulationProcessor();
            _comManipulationEvents    = new ManipulationEvents(_comManipulationProcessor, ManipulationEventHandler);

            SupportedManipulations = supportedManipulations;
        }
        public ManipulationEvents(IConnectionPointContainer connectionPointContainer, IManipulationEvents callBack)
        {
            _callBack = callBack;

            Guid manipulationEventsId = new Guid(IIDGuid.IManipulationEvents);

            connectionPointContainer.FindConnectionPoint(ref manipulationEventsId, out _connectionPoint);
            _connectionPoint.Advise(this, out _cookie);
        }
        public ManipulationEvents(IConnectionPointContainer connectionPointContainer, IManipulationEvents callBack)
        {
            _callBack = callBack;

            Guid manipulationEventsId = new Guid(IIDGuid.IManipulationEvents);
            connectionPointContainer.FindConnectionPoint(ref manipulationEventsId, out _connectionPoint);
            _connectionPoint.Advise(this, out _cookie);
        }
        /// <summary>
        /// Create new manipulation processor
        /// </summary>
        /// <remarks>
        /// Call the <see cref="ProcessDown"/>, <see cref="ProcessMove"/>, <see cref="ProcessUp"/> to feed the processor.
        /// Register on <see cref="ManipulationStarted"/>, <see cref="ManipulationDelta"/> and <see cref="ManipulationCompleted"/>
        /// to handle manipulation events
        /// </remarks>
        /// <param name="supportedManipulations">Activate specific manipulation (scale, translate, rotate)</param>
        public ManipulationProcessor(ProcessorManipulations supportedManipulations)
        {
            _comManipulationProcessor = new ManipulationInterop.ManipulationProcessor();
            _comManipulationEvents = new ManipulationEvents(_comManipulationProcessor, ManipulationEventHandler);

            SupportedManipulations = supportedManipulations;
        }