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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -

Why does a .NET 4.0 program produce a system.unauthorizedAccess error on a Windows Server 2012 machine with .NET 4.5 installed? -