Search code examples
c#windows-runtimetransformmatrix-transform

Convert GeneralTransform to MatrixTransform in WinRT


In full .net I can convert GeneralTransform to MatrixTransform with code (look to another question):

var matrixTransform = new MatrixTransform(generalTransform.Value);

But in WinRT GeneralTransform haven't Value property. How I can do converting in WinRT?


Solution

  • In the full .NET version (WPF, Silverlight) the GeneralTransform class does not have a Value property either. This property is introduced in the Transform class which derives from GeneralTransform. I suppose that's the same in WinRT. It is generally not possible to convert a GeneralTransform to a MatrixTransformbecause the transformation of a GeneralTransform must no necessarily be based on (or can be expressed as) a matrix.