Getting an icon to always be unrotated regardless of parent rotations in WPF
- by Jeff Moser
Is there an easy way in WPF to specify the orientation of an icon (or Button, or any WPF object) so that it always effectively remains unrotated regardless of the rotations of the parent transforms?
For example, I'd like to have an icon like this:
+ + +
+ +
+++++ +
+ + +
+ + +
However, if I dock it to the left side, it'd by default look like this:
+++++
+
+
+
+++++
+++ +
and if I docked it to the right, it'd be like this:
+ +++
+++++
+
+
+
+++++
Is there a way to make it always be:
+ + +
+ +
+++++ +
+ + +
+ + +
? I know I could manually track where it's docked and rotate it appropriately, but I was wondering if there's a clever way to effectively give the icon "gravity" to always point down.
Thanks!