I am using Rectangles and RegularPolygons to represent some custom look and feel in Fuse. I wanted to know if this is the best way to rotate my shapes as there isn’t a rotation property on the shape itself (which would be very useful).
<Rectangle ux:Name="Rec1" Width="14" Height="14" Fill="#FFF" CornerRadius="3" />
<RegularPolygon ux:Name="Tri1" Sides="3" Fill="#000" Width="12" Height="12" />
<WhileTrue Value="{someBool}">
<Rotate Target="Rec1" Degrees="45" />
<Rotate Target="Tri1" Degrees="180" />
</WhileTrue>
This gives me a nice little white diamond shape with rounded corners and an upside down triangle for a custom control I’m making.
In most cases, someBool
is always true because I want the rotation all the time, it’s not conditional. But I find it strange I have to use it in this context to make rotation work? Is there a better way? I could use images, but my diamond is being used in a popup panel to make a little pointer to where the popup orginated. Like a chat bubble.