Question

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?

Was it helpful?

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.

OTHER TIPS

Maybe something like this:

transformGroup.Children.Add(generalTransform);
var matrixTransform = new MatrixTransform();
matrixTransform.Matrix = transformGroup.Value;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top