views:

730

answers:

1

Does anyone know of an example of how to display a PopUp on MouseOver of a ComboBoxItem? TIA

EDIT: I know how to create, style and position the PopUp but not how to display it! I may be retired.

+1  A: 

Before we start, could you just use a tooltip?

otherwise, style the ComboBoxItem's control telmplate, include your popup in the style positioned where you want but set the Isopen property to false.

Use a trigger on mouse over to set your popup's IsOpen property to true.

here is an example of using a trigger OnMouseOver

you will end up with a trigger in your style like this :-

  <Style.Triggers>
    <Trigger Property="IsMouseOver" Value="True">
      <Setter TargetName="thePopupsName"
              Property="IsOpen"
              Value="True" />
    </Trigger>
  </Style.Triggers>

when the mouseOver occurs the popup will popup, when its gone the popup will return to its default value.

Aran Mulholland
I need it to be interactive. Thank you, makes perfect sense now!
Brad
actually it would be the control template triggers, not the styles
Aran Mulholland
Yes, thanks again. Working well!
Brad
When using a ComboBoxItem, it appears that Property="IsHighlighted" is more conducive. Some strange behaviour because as you MouseOver the PopUp, the MouseOver on the ComboBoxItem is no longer valid.
Brad