How to get the rotation value of a UI Element in WPF -
i've figured out how assign rotation value (element.rendertransform = new rotatetransform(x)), how rotation value of element?
for example, if wanted make 1 ui element have same rotation angle ui element, how that?
you can rotation value doing:
rotatetransform rotation = element.rendertransform rotatetransform; if (rotation != null) // make sure transform rotatetransform { double rotationindegrees = rotation.angle; // rotationindegrees here, if needed... }
if want make uielement rotate in same way, can assign same transform:
element2.rendertransform = element.rendertransform;
Comments
Post a Comment