I have two controls in a grid, an Ellipse and a Popup. The idea is that both of the controls are only displayed if the IsDirty property in a view model is true; if so, the Ellipse is green if the same view model IsValid and red if not, while the Popup displays messages if the user has the mouse over the popup.
The content and bindings for the Popup are correct, so I am wondering if I should be able to control whether it IsOpen or not by using a trigger in it's own style as in the code below.
Cheers,
Berryl
<Popup x:Name="dirtyPopup" AllowsTransparency="True" >
<Popup.Style>
<Style TargetType="Popup">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="IsOpen" Value="{Binding IsDirty}"/>
</Trigger>
</Style.Triggers>
</Style>
</Popup.Style>
<Grid content goes here />
</Popup>