Reputation: 11
I have WPF popup control that needs to have transparent background. I set AllowsTransparency="True" but it isn't applied. This is on a desktop application. Applying allowsTransparency from code behind doesn't help also, it actually sets it to false. Does anyone have solution about this? Thanks!
The xaml:
<Popup Name="myPopup"
StaysOpen="True"
Placement="Right"
MinWidth="100"
MinHeight="100"
Width="Auto"
Height="Auto"
PopupAnimation="Fade"
**AllowsTransparency="True"**>
<Border BorderThickness="0"
BorderBrush="{x:Static styles:Resources.myBorderBrush}"
Background="{StaticResource myBackground}"
Effect="{StaticResource myShadowEffect}">
<StackPanel>
Upvotes: 1
Views: 1095
Reputation: 287
verify that your application runs in full trust. According to msdn page for Popup.AllowsTransparency property:
If the AllowsTransparency property is set to true in an application that does not run in full trust, the AllowsTransparency property value is changed to false.
Upvotes: 2