Domanda

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?

È stato utile?

Soluzione

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.

Altri suggerimenti

Maybe something like this:

transformGroup.Children.Add(generalTransform);
var matrixTransform = new MatrixTransform();
matrixTransform.Matrix = transformGroup.Value;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top