Open topsterde opened 3 years ago
The reason why RotateTransform
is not applied is because AllowsTransparency
is false. Without this, the Popup has to stay rectangular. If you set it to true the rotation will also be applied. You could use the following method or refer to the method here.
<Grid Margin="50" Width="100" Height="100" HorizontalAlignment="Center" VerticalAlignment="Center" Background="LightGray">
<Grid.LayoutTransform>
<RotateTransform Angle="45" />
</Grid.LayoutTransform>
<Popup IsOpen="True" Placement="Center" AllowsTransparency="False">
<Border Background="Green">
<TextBlock Text="Popup without AllowsTransparency"/>
</Border>
</Popup>
<Popup IsOpen="True" Placement="Center" AllowsTransparency="True" >
<Popup.LayoutTransform>
<RotateTransform Angle="-45" />
</Popup.LayoutTransform>
<Border Background="Yellow">
<TextBlock Text="Popup with AllowsTransparency"/>
</Border>
</Popup>
</Grid>
Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No
Problem description: Depending on AllowsTransparency the popup inherits the transformation or not.
Actual behavior:
Expected behavior:
Minimal repro: