문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

Maybe something like this:

transformGroup.Children.Add(generalTransform);
var matrixTransform = new MatrixTransform();
matrixTransform.Matrix = transformGroup.Value;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top