The problem here is that .Value returns a one-off Matrix representing the
current effective transform of the object upon which you're calling .Value.
It is not a read-write property. (incidentally, even if it were, since
Value returns a Matrix which is a value type, and since all value types are
pass by value by default, this wouldn't work in that case either)
If you control your app to the extent that you can ensure that the value of
RenderTransform is always a given type of Transform, you can do this like
((RotateTransform)this.m_TestImage.RenderTransform).Angle += 180;
Or you could use a MatrixTransform and its Matrix property if you want
general transformations. Remember that you still can't call
MatrixTransform.Matrix.RotatePrepent(180) directly, since the RotatePrepend
will operate on the temporary return value of .Matrix.
-Adam Smith [MS]
"Jason [Mobiform]" <Jason@mobiform.com> wrote in message
> the Image change not the Rotation.??
> Maybe you could post an image of the result you are getting and what you
> want to happen?
> "Thomas Mueller" <email@example.com> wrote in message
>> Hi NG,
>> how can i change the Rotate- State of an Image in C# Code? If I use the
>> following code:
>> // ore:
>> this.m_TestImage.RenderTransform.Value.RotateAt(45, 25,
>> catch (Exception Ex)
>> the Image change not the Rotation.
>> Thank you for all Answers