You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I declared class that uses System.Numerics.Matrix3x2 as property setter and getter in PCL Profile7.
Then I implement class in Windows8.1 Store App that derived from this class and try to set value of System.Numerics.Matrix3x2 to CanvasDrawingSession.Transform.
This raises compile error like below. type must be 'System.Numerics.Matrix3x2' to match overridden member 'NoteAppCommon.NoteViewEtc.Graphics3.Transform'
If I declare this base class in Windows8.1 Store App,build succeed.
I attached the picture.In left side I declared Graphics3 as PCL lib. In right side I declared Graphics2 and Win2DGraphics2 and Win2DGraphics3. Graphics2 is same to Graphics3 except class name.
If I compile,Win2dGraphics2 will succeed and Win2dGraphics3 will fail with error above.
The 8.1 version of Win2D dates from before the numerics types were properly understood by the CLR and WinRT, so includes its own local version of those types instead. These have the same struct names and functionality but are not interchangeable with the version provided by System.Numerics.Vectors, which is used on Win10+.
When you build against the 8.1 version of Win2D, you must use the numerics types provided by the Win2D 8.1 nuget package, and not the versions from System.Numerics.Vectors. The Win2D version of these types will not work in a PCL because Win2D is processor architecture specific. Therefore all your code that uses these types needs to be built targeting 8.1 Store.
For Win10 and above, Win2D uses the standard System.Numerics.Vectors math types and no longer provides its own local version, so PCL referencing the vector types should work as expected.
I declared class that uses System.Numerics.Matrix3x2 as property setter and getter in PCL Profile7.
Then I implement class in Windows8.1 Store App that derived from this class and try to set value of System.Numerics.Matrix3x2 to CanvasDrawingSession.Transform.
This raises compile error like below.
type must be 'System.Numerics.Matrix3x2' to match overridden member 'NoteAppCommon.NoteViewEtc.Graphics3.Transform'
If I declare this base class in Windows8.1 Store App,build succeed.
I attached the picture.In left side I declared Graphics3 as PCL lib. In right side I declared Graphics2 and Win2DGraphics2 and Win2DGraphics3. Graphics2 is same to Graphics3 except class name.
If I compile,Win2dGraphics2 will succeed and Win2dGraphics3 will fail with error above.
Is this related to the conversion like Why does Win2D include three different sets of vector and matrix types?.
Or System.Numerics.Matrix3x2 in PCL is treated as different class from System.Numerics.Matrix3x2 in Store App?
The text was updated successfully, but these errors were encountered: