Frage

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?

War es hilfreich?

Lösung

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.

Andere Tipps

Maybe something like this:

transformGroup.Children.Add(generalTransform);
var matrixTransform = new MatrixTransform();
matrixTransform.Matrix = transformGroup.Value;
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top