Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This example shows you how to use UXPopup to display information from a UIElement.

Example

Description

You can assign UXPopup to an UIElement along with the predefined set of rules on what mouse action will open or close the UXPopup. When assigning the UIElement you can also add additional information using UXPopup.TargetContent, this attached property sets the specified content to the UXPopup when it is opened.

The following code shows how to use UXPopup to display information from element.

Code

Code Block
titleXAML
languagexml
<Grid x:Name="LayoutRoot">
    <Intersoft:UXPopup x:Name="MyPopup" HorizontalAlignment="Left" VerticalAlignment="Top"
                       PreferredPosition="Bottom" DisableOverlay="True">
    </Intersoft:UXPopup>
    <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
        <Image Height="100" Source="/Chrysanthemum.jpg" Stretch="Fill" Width="100" Margin="8"
                Intersoft:UXPopup.TargetPopup="{Binding ElementName=MyPopup}"
                Intersoft:UXPopup.TargetContent="Chrysanthemum Picture"
                Intersoft:UXPopup.TargetMouseEnterAction="ShowPopup"
                Intersoft:UXPopup.TargetMouseLeaveAction="HidePopup"
                Intersoft:UXPopup.TargetHideLatency="0.2"/>
        <Image Height="100" Source="/Hydrangeas.jpg" Stretch="Fill" Width="100" Margin="8"
                Intersoft:UXPopup.TargetPopup="{Binding ElementName=MyPopup}"
                Intersoft:UXPopup.TargetContent="Hydrangeas Picture"
                Intersoft:UXPopup.TargetMouseEnterAction="ShowPopup"
                Intersoft:UXPopup.TargetMouseLeaveAction="HidePopup"
                Intersoft:UXPopup.TargetHideLatency="0.2"/>
        <Image Height="100" Source="/Tulips.jpg" Stretch="Fill" Width="100" Margin="8"
                Intersoft:UXPopup.TargetPopup="{Binding ElementName=MyPopup}"
                Intersoft:UXPopup.TargetContent="Tulips Picture"
                Intersoft:UXPopup.TargetMouseEnterAction="ShowPopup"
                Intersoft:UXPopup.TargetMouseLeaveAction="HidePopup"
                Intersoft:UXPopup.TargetHideLatency="0.2"/>
    </StackPanel>
</Grid>

 

Related Topics

Content by Label
spaces@self
reversetrue
showLabelsfalse
max5
sortmodified
labelskb-how-to-article -use-uxpopup-to-display-information-from-element
showSpacefalse
typepage