locked
Why the enum "TouchAction" contains different values in Silverlight 4.0 & WPF 4.0 RRS feed

  • Question

  • I am working on a multi-touch application toolkit (touchtoolkit.codeplex.com) for both Silverlight & WPF. I have separate project files that maps to same source. So, basically recompiling the code for two platforms.

    Now, after spending few hours on a bug, I found this interesting discrepancy in implementation of "TouchAction" enum in the two platforms. I was wondering what could be the reason to have different values for same enumeration in same class???

    =================== Silverlight 4.0 ================================
    #region Assembly System.Windows.dll, v2.0.50727
    // c:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Windows.dll
    #endregion

    using System;

    namespace System.Windows.Input
    {
        // Summary:
        //     Describes the action of a specific touch point.
        public enum TouchAction
        {
            // Summary:
            //     A touch action from a TOUCHEVENTF_DOWN message.
            Down = 1,
            //
            // Summary:
            //     A touch action from a TOUCHEVENTF_MOVE message.
            Move = 2,
            //
            // Summary:
            //     A touch action from a TOUCHEVENTF_UP message.
            Up = 3,
        }
    }

    ================== WPF 4.0: PresentationCore.dll =======================
    #region Assembly PresentationCore.dll, v4.0.30319
    // C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\PresentationCore.dll
    #endregion

    using System;

    namespace System.Windows.Input
    {
        // Summary:
        //     Describes the action of a specific touch point.
        public enum TouchAction
        {
            // Summary:
            //     The act of putting a finger onto the screen.
            Down = 0,
            //
            // Summary:
            //     The act of dragging a finger across the screen.
            Move = 1,
            //
            // Summary:
            //     The act of lifting a finger off of the screen.
            Up = 2,
        }
    }

    Sunday, May 9, 2010 12:04 AM