Remarks

A UXPopup control displays content in a separate layer relative to an element or point on the screen. When the IsOpen property is set to True, UXPopup will show the content with a smooth animation.

This animation is one of the many added values from UXPopup that allows you to create richer application.

Creating a UXPopup

Example

The following example shows how to define a UXPopup control. This example places the Button and UXPopup in a Grid panel. The content of the UXPopup appears in a TextBlock control, which displays its text in a separate layer that floats over the application near the Grid panel that host it.

<Grid x:Name="LayoutRoot" Background="White">
        <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                <Intersoft:UXPopup PreferredPosition="BottomLeft" x:Name="MyPopup">
                        <Grid Width="100" Height="100" Background="#FF8ECEFF">
                                <TextBlock TextWrapping="Wrap"
									Text="Put your popup content here" Margin="4"/>
                        </Grid>
                </Intersoft:UXPopup>
                <Button Content="Button" VerticalAlignment="Top" Width="80"
					Click="Button_Click"/>
        </Grid>
</Grid>
private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
{
        this.MyPopup.IsOpen = !this.MyPopup.IsOpen;
}

Working with BoundaryOffset Property

Considering user experience aspects, there are certain scenarios where you do not want to align the popup to screen edge directly. You may want to have a certain distance from the screen edge as the boundary of the popup.

Using UXPopup you can achieve this scenario by specifying the BoundaryOffset property.

The following illustration shows how the boundary offset works.

Working with PreferredHorizontalDirection Property, PreferredPosition Property and PreferredVerticalDirection Property

The position of UXPopup can be generalized into two types, one is relative and the other is absolute.

In absolute positioning, the position of UXPopup will be depends on the root element, you'll then need to specify the HorizontalOffset and VerticalOffset which determine the position of the UXPopup.

In relative positioning, the position of UXPopup will be depends on its bounding box which is the control itself. There are ten positions that you can choose from, they are:

The following illustrations show how UXPopup positioning works.

Top, Left, Right and Bottom Positions

<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="300"
			Height="150" Background="#FFFFBB00">
        <Intersoft:UXPopup x:Name="UXPopup_Top" PreferredPosition="Top">
                <Grid Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = Top" Margin="4"/>
                </Grid>
        </Intersoft:UXPopup>
        <Intersoft:UXPopup x:Name="UXPopup_Left" PreferredPosition="Left">
                <Grid Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = Left" Margin="4"/>
                </Grid>
        </Intersoft:UXPopup>
        <Intersoft:UXPopup x:Name="UXPopup_Right" PreferredPosition="Right">
                <Grid Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = Right" Margin="4"/>
                </Grid>
        </Intersoft:UXPopup>
        <Intersoft:UXPopup x:Name="UXPopup_Bottom" PreferredPosition="Bottom">
                <Grid Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = Bottom" Margin="4"/>
                </Grid>
        </Intersoft:UXPopup>
        <TextBlock HorizontalAlignment="Center" Text="Bounding Box"
			VerticalAlignment="Center"/>
</Grid>

TopLeft, TopRight, BottomLeft and BottomRight positions

<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="300"
			Height="150" Background="#FFFFBB00">
        <Intersoft:UXPopup x:Name="UXPopup_TopLeft" PreferredPosition="TopLeft"
					PreferredHorizontalDirection="Right"
					PreferredVerticalDirection="Down">
                <StackPanel Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = TopLeft"/>
                        <TextBlock Text="PreferredHorizontalDirection = Right"/>
                        <TextBlock Text="PreferredVerticalDirection = Down"/>
                </StackPanel>
        </Intersoft:UXPopup>
        <Intersoft:UXPopup x:Name="UXPopup_TopRight" PreferredPosition="TopRight"
					PreferredHorizontalDirection="Right"
					PreferredVerticalDirection="Down">
                <StackPanel Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = TopRight"/>
                        <TextBlock Text="PreferredHorizontalDirection = Right"/>
                        <TextBlock Text="PreferredVerticalDirection = Down"/>
                </StackPanel>
        </Intersoft:UXPopup>
        <Intersoft:UXPopup x:Name="UXPopup_BottomRight" PreferredPosition="BottomRight"
					PreferredHorizontalDirection="Right"
					PreferredVerticalDirection="Down">
                <StackPanel Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = BottomRight"/>
                        <TextBlock Text="PreferredHorizontalDirection = Right"/>
                        <TextBlock Text="PreferredVerticalDirection = Down"/>
                </StackPanel>
        </Intersoft:UXPopup>
        <Intersoft:UXPopup x:Name="UXPopup_BottomLeft" PreferredPosition="BottomLeft"
					PreferredHorizontalDirection="Right" PreferredVerticalDirection="Down">
                <StackPanel Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = BottomLeft"/>
                        <TextBlock Text="PreferredHorizontalDirection = Right"/>
                        <TextBlock Text="PreferredVerticalDirection = Down"/>
                </StackPanel>
        </Intersoft:UXPopup>
        <TextBlock HorizontalAlignment="Center" Text="Bounding Box" VerticalAlignment="Center"/>
</Grid>

This positioning is determined by the PreferredPosition property. As you can see above, the Top, Left, Right, and Bottom mode always show the popup position in the center of each respective position, while the BottomLeft, BottomRight, TopLeft and TopRight include calculation that determined by PreferredHorizontalDirection and PreferredVerticalDirection.

See the following illustration to understand how these properties work together.

<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="300"
			Height="150" Background="#FFFFBB00">
        <Intersoft:UXPopup x:Name="UXPopup_TopLeft" PreferredPosition="TopLeft"
					PreferredHorizontalDirection="Left"
					PreferredVerticalDirection="Down">
                <StackPanel Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = TopLeft"/>
                        <TextBlock Text="PreferredHorizontalDirection = Left"/>
                        <TextBlock Text="PreferredVerticalDirection = Down"/>
                </StackPanel>
        </Intersoft:UXPopup>
        <Intersoft:UXPopup x:Name="UXPopup_TopRight" PreferredPosition="TopRight"
					PreferredHorizontalDirection="Left"
					PreferredVerticalDirection="Down">
                <StackPanel Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = TopRight"/>
                        <TextBlock Text="PreferredHorizontalDirection = Left"/>
                        <TextBlock Text="PreferredVerticalDirection = Down"/>
                </StackPanel>
        </Intersoft:UXPopup>
        <Intersoft:UXPopup x:Name="UXPopup_BottomRight" PreferredPosition="BottomRight"
					PreferredHorizontalDirection="Left"
					PreferredVerticalDirection="Down">
                <StackPanel Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = BottomRight"/>
                        <TextBlock Text="PreferredHorizontalDirection = Left"/>
                        <TextBlock Text="PreferredVerticalDirection = Down"/>
                </StackPanel>
        </Intersoft:UXPopup>
        <Intersoft:UXPopup x:Name="UXPopup_BottomLeft" PreferredPosition="BottomLeft"
					PreferredHorizontalDirection="Left"
					PreferredVerticalDirection="Down">
                <StackPanel Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = BottomLeft"/>
                        <TextBlock Text="PreferredHorizontalDirection = Left"/>
                        <TextBlock Text="PreferredVerticalDirection = Down"/>
                </StackPanel>
        </Intersoft:UXPopup>
        <TextBlock HorizontalAlignment="Center" Text="Bounding Box" VerticalAlignment="Center"/>
</Grid>

<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="300"
			Height="150" Background="#FFFFBB00">
        <Intersoft:UXPopup x:Name="UXPopup_TopLeft" PreferredPosition="TopLeft"
					PreferredHorizontalDirection="Right"
					PreferredVerticalDirection="Up">
                <StackPanel Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = TopLeft"/>
                        <TextBlock Text="PreferredHorizontalDirection = Right"/>
                        <TextBlock Text="PreferredVerticalDirection = Up"/>
                </StackPanel>
        </Intersoft:UXPopup>
        <Intersoft:UXPopup x:Name="UXPopup_TopRight" PreferredPosition="TopRight"
					PreferredHorizontalDirection="Right"
					PreferredVerticalDirection="Up">
                <StackPanel Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = TopRight"/>
                        <TextBlock Text="PreferredHorizontalDirection = Right"/>
                        <TextBlock Text="PreferredVerticalDirection = Up"/>
                </StackPanel>
        </Intersoft:UXPopup>
        <Intersoft:UXPopup x:Name="UXPopup_BottomRight" PreferredPosition="BottomRight"
					PreferredHorizontalDirection="Right"
					PreferredVerticalDirection="Up">
                <StackPanel Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = BottomRight"/>
                        <TextBlock Text="PreferredHorizontalDirection = Right"/>
                        <TextBlock Text="PreferredVerticalDirection = Up"/>
                </StackPanel>
        </Intersoft:UXPopup>
        <Intersoft:UXPopup x:Name="UXPopup_BottomLeft" PreferredPosition="BottomLeft"
					PreferredHorizontalDirection="Right"
					PreferredVerticalDirection="Up">
                <StackPanel Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = BottomLeft"/>
                        <TextBlock Text="PreferredHorizontalDirection = Right"/>
                        <TextBlock Text="PreferredVerticalDirection = Up"/>
                </StackPanel>
        </Intersoft:UXPopup>
        <TextBlock HorizontalAlignment="Center" Text="Bounding Box"
			VerticalAlignment="Center"/>
</Grid>

<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="300"
			Height="150" Background="#FFFFBB00">
        <Intersoft:UXPopup x:Name="UXPopup_TopLeft" PreferredPosition="TopLeft"
					PreferredHorizontalDirection="Left"
					PreferredVerticalDirection="Up">
                <StackPanel Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = TopLeft"/>
                        <TextBlock Text="PreferredHorizontalDirection = Left"/>
                        <TextBlock Text="PreferredVerticalDirection = Up"/>
                </StackPanel>
        </Intersoft:UXPopup>
        <Intersoft:UXPopup x:Name="UXPopup_TopRight" PreferredPosition="TopRight"
					PreferredHorizontalDirection="Right"
					PreferredVerticalDirection="Up">
                <StackPanel Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = TopRight"/>
                        <TextBlock Text="PreferredHorizontalDirection = Left"/>
                        <TextBlock Text="PreferredVerticalDirection = Up"/>
                </StackPanel>
        </Intersoft:UXPopup>
        <Intersoft:UXPopup x:Name="UXPopup_BottomRight" PreferredPosition="BottomRight"
					PreferredHorizontalDirection="Right"
					PreferredVerticalDirection="Up">
                <StackPanel Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = BottomRight"/>
                        <TextBlock Text="PreferredHorizontalDirection = Left"/>
                        <TextBlock Text="PreferredVerticalDirection = Up"/>
                </StackPanel>
        </Intersoft:UXPopup>
        <Intersoft:UXPopup x:Name="UXPopup_BottomLeft" PreferredPosition="BottomLeft"
					PreferredHorizontalDirection="Right" PreferredVerticalDirection="Up">
                <StackPanel Background="#FF8ECEFF">
                        <TextBlock Text="PreferredPosition = BottomLeft"/>
                        <TextBlock Text="PreferredHorizontalDirection = Left"/>
                        <TextBlock Text="PreferredVerticalDirection = Up"/>
                </StackPanel>
        </Intersoft:UXPopup>
        <TextBlock HorizontalAlignment="Center" Text="Bounding Box" VerticalAlignment="Center"/>
</Grid>

Center Parent position

<Grid HorizontalAlignment="Center" VerticalAlignment="Center"
		Width="300" Height="150" Background="#FFFFBB00">
    <Intersoft:UXPopup x:Name="UXPopup_CenterParent"
			PreferredPosition="CenterParent">
        <Grid Background="#FF8ECEFF">
            <TextBlock Text="PreferredPosition = CenterParent"
				VerticalAlignment="Center" d:LayoutOverrides="Width"
				HorizontalAlignment="Center" Margin="40"/>
        </Grid>
    </Intersoft:UXPopup>
</Grid>

Working with RelativeTo Property

By default the bounding box of UXPopup is the control itself, you can customize this by specifying the RelativeTo property. The following code shows how to change the bounding box to another UIElement, in this case its a Button.

<Grid x:Name="LayoutRoot">
    <Grid VerticalAlignment="Top" HorizontalAlignment="Left">
        <Intersoft:UXPopup PreferredPosition="TopRight"
				x:Name="MyPopup" RelativeTo="{Binding ElementName=MyButton}">
            <Grid Width="100" Height="100" Background="#FF8ECEFF">
                <TextBlock TextWrapping="Wrap"
					Text="Put your popup content here" Margin="4"/>
            </Grid>
        </Intersoft:UXPopup>
    </Grid>
    <Button Width="100" Content="Click Me" x:Name="MyButton"
		HorizontalAlignment="Center" VerticalAlignment="Center"
		Click="MyButton_Click"/>
</Grid>
private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
{
        this.MyPopup.IsOpen = !this.MyPopup.IsOpen;
}

Definition

public class UXPopup : ISPopup

Summary

The following table summarizes the members exposed in this class.

Public Constructors

UXPopup Constructor()Initializes a new instance of the UXPopup class.

Public Properties

AutoRefreshGets the auto refresh time out.
AutoRepositionGets or set the minimum boundary offset.
BoundaryOffsetGets or set the minimum boundary offset.
CloseOnModalGets or sets a value that indicates whether the popup should be closed when its modal.
CornerRadiusNot applicable.
DisableOverlayGets or sets a value that determines whether overlay is disabled.
DisplayAnimationGets or sets a value that determines the display animation.
EnableFadeInAnimationGets or sets a value that determines whether the fade animation is enabled.
EnableFadeOutAnimationGets or sets a value that determines whether the fade animation is enabled.
FadeInStoryboardGets the fade in storyboard.
FadeOutStoryboardGets the fade out storyboard.
FlyInStoryboardGets the fly in storyboard.
FlyOutStoryboardGets the fly out storyboard.
HideAnimationGets or sets a value that determines the hide animation.
HorizontalOffsetGets or sets the distance between the left side of the Silverlight control and the left side of the popup.
IsModalGets or sets whether the popup is modal.
IsNavigationContainerGets or sets a value that determines whether the popup contains navigation controls that should be automatically synchronized during navigation session.
IsOpenGets or sets whether the popup is currently displaying on the screen.
LogicalOwnerGets the logical control that owns this popup.
OwnerGets the dependency object that owns this popup.
PopupElementGets the popup element.
PreferredHorizontalDirectionGets or sets the preferred horizontal direction.
PreferredPositionGets or sets the preferred pop up positions.
PreferredVerticalDirectionGets or sets the preferred vertical direction.
RelativeToGets or sets the target relative element.
RootElementGets the root element.
SlideDirectionGets or sets a value that determine the slide direction when slide animation is used.
SlideXInStoryboardGets the slide x in storyboard.
SlideXOutStoryboardGets the slide x out storyboard.
SlideYInStoryboardGets the slide y in storyboard.
SlideYOutStoryboardGets the slide y out storyboard.
StaysOpenGets or sets a value that determines whether the popup stays open regardless the hide command.
VerticalOffsetGets or sets the distance between the top of the Silverlight control and the top of the popup.
ZoomInStoryboardGets the zoom in storyboard.
ZoomOutStoryboardGets the zoom out storyboard.

Protected Properties

ProductProduct Info.

Fields

AutoRepositionPropertyIdentifies the AutoReposition dependency property.
BoundaryOffsetPropertyIdentifies the BoundaryOffset dependency property.
ClosedEventIdentifies the Closed routed event.
CloseOnModalPropertyIdentifies the CloseOnModal dependency property.
DisableOverlayPropertyIdentifies the DisableOverlay dependency property.
DisplayAnimationPropertyIdentifies the DisplayAnimation dependency property.
EnableFadeInAnimationPropertyIdentifies the EnableFadeAnimation dependency property.
EnableFadeOutAnimationPropertyIdentifies the EnableFadeAnimation dependency property.
HideAnimationPropertyIdentifies the HideAnimation dependency property.
HorizontalOffsetPropertyIdentifies the HorizontalOffset dependency property.
IsModalPropertyIdentifies the IsModal dependency property.
IsNavigationContainerPropertyIdentifies the IsNavigationContainer dependency property.
IsOpenPropertyIdentifies the IsOpen dependency property.
OpenedEventIdentifies the Opened routed event.
PopupHostPropertyIdentifies the PopupHost dependency property.
PreferredHorizontalDirectionPropertyIdentifies the PreferredHorizontalDirection dependency property.
PreferredPositionPropertyIdentifies the PreferredPosition dependency property.
PreferredVerticalDirectionPropertyIdentifies the PreferredVerticalDirection dependency property.
RelativeToPropertyIdentifies the RelativeTo dependency property.
RepositionedEventIdentifies the Repositioned routed event.
SlideDirectionPropertyIdentifies the SlideDirection dependency property.
StaysOpenPropertyIdentifies the StaysOpen dependency property.
TargetContentPropertyIdentifies the TargetContent dependency property.
TargetDataContextPropertyIdentifies the TargetDataContext dependency property.
TargetHideLatencyPropertyIdentifies the TargetHideLatency dependency property.
TargetMouseClickActionPropertyIdentifies the TargetMouseClickAction dependency property.
TargetMouseEnterActionPropertyIdentifies the TargetMouseEnterAction dependency property.
TargetMouseLeaveActionPropertyIdentifies the TargetMouseLeaveAction dependency property.
TargetPopupPropertyIdentifies the TargetPopup dependency property.
TargetShowLatencyPropertyIdentifies the TargetShowLatency dependency property.
VerticalOffsetPropertyIdentifies the VerticalOffset dependency property.

Static Methods

GetPopupHost(UIElement)Gets the popup host.
GetSafeTransformPoint(ISFramework, UIElement)Gets a visual transformation point based on the given element which can be safely used in cross-platform codes.
GetTargetContent(UIElement)Gets the content.
GetTargetDataContext(UIElement)Gets the data context.
GetTargetHideLatency(UIElement)Gets the hide latency.
GetTargetMouseClickAction(UIElement)Gets the mouse click action.
GetTargetMouseEnterAction(UIElement)Gets the mouse enter action.
GetTargetMouseLeaveAction(UIElement)Gets the mouse leave action.
GetTargetPopup(UIElement)Gets the target popup.
GetTargetShowLatency(UIElement)Gets the show latency.
SetPopupHost(UIElement, Control)Sets the popup host.
SetTargetContent(UIElement, object)Sets the content.
SetTargetDataContext(UIElement, object)Sets the data context.
SetTargetHideLatency(UIElement, double)Sets the hide latency.
SetTargetMouseClickAction(UIElement, PopupAction)Sets the mouse click action.
SetTargetMouseEnterAction(UIElement, PopupAction)Sets the mouse enter action.
SetTargetMouseLeaveAction(UIElement, PopupAction)Sets the mouse leave action.
SetTargetPopup(UIElement, UXPopup)Sets popup to target element.
SetTargetShowLatency(UIElement, double)Sets the show latency.

Public Methods

AttachEventHandlers()Attach built-in event handlers to control templates. Call this method if necessary.
DetachedEventHandlers()Detach built-in event handlers from control templates. Call this method if necessary.
Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
GetHostRect()Gets host rectangle dimension.
GetOffset(FrameworkElement, FrameworkElement, Point)Gets popup offset based on preferred position and relative offset.
GetPopupRect()Gets popup rectangle dimension.
GetRelativeOffset(FrameworkElement&)Gets popup relative offset based on specified RelativeTo.
GetVisualRect()Gets the visual / rectangle dimension.
InitializeStoryboards()Initializes storyboards.
InitializeTemplates()Initializes control templates.
OnApplyTemplate()Builds the visual tree for the UXPopup when a new template is applied.
Refresh()Refresh popup positioning.
RefreshClip()Perform clipping to the dimension of the control. Call this method if necessary
ResolvePosition()Resolve popup positions.
SetUpdatePositionMode(UpdatePositionMode)Set update position mode.
UpdatePosition()Update popup positions.

Protected Methods

OnContentChanged(object, object)Called when the value of the Content property changes.
OnUnloaded(object, RoutedEventArgs)Called when the element is unloaded.

Events

ClosedOccurs when the popup is closed.
GotFocusOccurs when this element gets logical focus.
KeyDownOccurs when a keyboard key is pressed while the UIElement has focus.
KeyUpOccurs when a keyboard key is released while the UIElement has focus.
LostFocusOccurs when this element loses logical focus.
MouseEnterOccurs when the mouse pointer enters the bounds of this element.
MouseLeaveOccurs when the mouse pointer leaves the bounds of this element.
MouseLeftButtonDownOccurs when the left mouse button is pressed (or when the tip of the stylus touches the tablet PC) while the mouse pointer is over a UIElement.
MouseLeftButtonUpOccurs when the left mouse button is released (or the tip of the stylus is removed from the tablet PC) while the mouse (or the stylus) is over a UIElement (or while a UIElement holds mouse capture).
MouseMoveOccurs when the mouse pointer moves while the mouse pointer is over the element.
MouseWheelOccurs when the mouse wheel moves while the mouse pointer is over this element.
OpenedOccurs when the popup is opened.
RepositionedOccurs when the popup is repositioned.

Public Constructors

public UXPopup()

Initializes a new instance of the UXPopup class.

Public Properties

public DispatcherTimer AutoRefresh { get; }

Gets the auto refresh time out.

public bool AutoReposition { get; set; }

Gets or set the minimum boundary offset.

public Thickness BoundaryOffset { get; set; }

Gets or set the minimum boundary offset.

public bool CloseOnModal { get; set; }

Gets or sets a value that indicates whether the popup should be closed when its modal.

public CornerRadius CornerRadius { get; set; }

Not applicable.

public bool DisableOverlay { get; set; }

Gets or sets a value that determines whether overlay is disabled.

Remarks

UXPopup control displays its content when the UXPopup property is set to True. By default there will be an overlay element that blocks the entire application so that if the user click at any elements outside the UXPopup contents, the UXPopup will be closed. You can change this default behavior by setting the DisableOverlay property to True. Furthermore you can also used the UXPopup property if you want to always display the UXPopup. The UXPopup and UXPopup events are raised when the UXPopup is open or closed.

 

public PopupAnimation DisplayAnimation { get; set; }

Gets or sets a value that determines the display animation.

Remarks

The UXPopup control has built-in support for the animations that are typically associated with behaviors like fade-in and slide-in. You can turn on these animations by setting the DisplayAnimation, UXPopup, UXPopup, UXPopup, UXPopup properties. UXPopup property is used when the UXPopup and UXPopup properties are set to PopupAnimation. Although with these properties you can control each visual effects individually, it is advised not to mix match the animations for DisplayAnimation or UXPopup, except if you want to disable one of the animation by setting the DisplayAnimation or UXPopup property to PopupAnimation.

 

public bool EnableFadeInAnimation { get; set; }

Gets or sets a value that determines whether the fade animation is enabled.

Remarks

The UXPopup control has built-in support for the animations that are typically associated with behaviors like fade-in and slide-in. You can turn on these animations by setting the UXPopup, UXPopup, EnableFadeInAnimation, UXPopup, UXPopup properties. UXPopup property is used when the UXPopup and UXPopup properties are set to PopupAnimation. Although with these properties you can control each visual effects individually, it is advised not to mix match the animations for UXPopup or UXPopup, except if you want to disable one of the animation by setting the UXPopup or UXPopup property to PopupAnimation.

 

public bool EnableFadeOutAnimation { get; set; }

Gets or sets a value that determines whether the fade animation is enabled.

Remarks

The UXPopup control has built-in support for the animations that are typically associated with behaviors like fade-in and slide-in. You can turn on these animations by setting the UXPopup, UXPopup, UXPopup, EnableFadeOutAnimation, UXPopup properties. UXPopup property is used when the UXPopup and UXPopup properties are set to PopupAnimation. Although with these properties you can control each visual effects individually, it is advised not to mix match the animations for UXPopup or UXPopup, except if you want to disable one of the animation by setting the UXPopup or UXPopup property to PopupAnimation.

 

public Storyboard FadeInStoryboard { get; }

Gets the fade in storyboard.

public Storyboard FadeOutStoryboard { get; }

Gets the fade out storyboard.

public Storyboard FlyInStoryboard { get; }

Gets the fly in storyboard.

public Storyboard FlyOutStoryboard { get; }

Gets the fly out storyboard.

public PopupAnimation HideAnimation { get; set; }

Gets or sets a value that determines the hide animation.

Remarks

The UXPopup control has built-in support for the animations that are typically associated with behaviors like fade-in and slide-in. You can turn on these animations by setting the UXPopup, HideAnimation, UXPopup, UXPopup, UXPopup properties. UXPopup property is used when the UXPopup and HideAnimation properties are set to PopupAnimation. Although with these properties you can control each visual effects individually, it is advised not to mix match the animations for UXPopup or HideAnimation, except if you want to disable one of the animation by setting the UXPopup or HideAnimation property to PopupAnimation.

 

public double HorizontalOffset { get; set; }

Gets or sets the distance between the left side of the Silverlight control and the left side of the popup.

public bool IsModal { get; set; }

Gets or sets whether the popup is modal.

public bool IsNavigationContainer { get; set; }

Gets or sets a value that determines whether the popup contains navigation controls that should be automatically synchronized during navigation session.

public bool IsOpen { get; set; }

Gets or sets whether the popup is currently displaying on the screen.

Remarks

UXPopup control displays its content when the IsOpen property is set to True. By default there will be an overlay element that blocks the entire application so that if the user click at any elements outside the UXPopup contents, the UXPopup will be closed. You can change this default behavior by setting the UXPopup property to True. Furthermore you can also used the UXPopup property if you want to always display the UXPopup. The UXPopup and UXPopup events are raised when the UXPopup is open or closed.

 

public FrameworkElement LogicalOwner { get; set; }

Gets the logical control that owns this popup.

public DependencyObject Owner { get; set; }

Gets the dependency object that owns this popup.

public Popup PopupElement { get; }

Gets the popup element.

public PopupHorizontalDirection PreferredHorizontalDirection { get; set; }

Gets or sets the preferred horizontal direction.

public PopupPosition PreferredPosition { get; set; }

Gets or sets the preferred pop up positions.

public PopupVerticalDirection PreferredVerticalDirection { get; set; }

Gets or sets the preferred vertical direction.

public FrameworkElement RelativeTo { get; set; }

Gets or sets the target relative element.

public Grid RootElement { get; }

Gets the root element.

public Direction SlideDirection { get; set; }

Gets or sets a value that determine the slide direction when slide animation is used.

Remarks

The UXPopup control has built-in support for the animations that are typically associated with behaviors like fade-in and slide-in. You can turn on these animations by setting the UXPopup, UXPopup, UXPopup, UXPopup, UXPopup properties. SlideDirection property is used when the UXPopup and UXPopup properties are set to PopupAnimation. Although with these properties you can control each visual effects individually, it is advised not to mix match the animations for UXPopup or UXPopup, except if you want to disable one of the animation by setting the UXPopup or UXPopup property to PopupAnimation.

 

public Storyboard SlideXInStoryboard { get; }

Gets the slide x in storyboard.

public Storyboard SlideXOutStoryboard { get; }

Gets the slide x out storyboard.

public Storyboard SlideYInStoryboard { get; }

Gets the slide y in storyboard.

public Storyboard SlideYOutStoryboard { get; }

Gets the slide y out storyboard.

public bool StaysOpen { get; set; }

Gets or sets a value that determines whether the popup stays open regardless the hide command.

Remarks

UXPopup control displays its content when the UXPopup property is set to True. By default there will be an overlay element that blocks the entire application so that if the user click at any elements outside the UXPopup contents, the UXPopup will be closed. You can change this default behavior by setting the UXPopup property to True. Furthermore you can also used the StaysOpen property if you want to always display the UXPopup. The UXPopup and UXPopup events are raised when the UXPopup is open or closed.

 

public double VerticalOffset { get; set; }

Gets or sets the distance between the top of the Silverlight control and the top of the popup.

public Storyboard ZoomInStoryboard { get; }

Gets the zoom in storyboard.

public Storyboard ZoomOutStoryboard { get; }

Gets the zoom out storyboard.

Protected Properties

protected ProductInfo Product { get; }

Product Info.

Fields

public static readonly DependencyProperty AutoRepositionProperty

Identifies the AutoReposition dependency property.

public static readonly DependencyProperty BoundaryOffsetProperty

Identifies the BoundaryOffset dependency property.

public static readonly RoutedEvent ClosedEvent

Identifies the Closed routed event.

public static readonly DependencyProperty CloseOnModalProperty

Identifies the CloseOnModal dependency property.

public static readonly DependencyProperty DisableOverlayProperty

Identifies the DisableOverlay dependency property.

public static readonly DependencyProperty DisplayAnimationProperty

Identifies the DisplayAnimation dependency property.

public static readonly DependencyProperty EnableFadeInAnimationProperty

Identifies the EnableFadeAnimation dependency property.

public static readonly DependencyProperty EnableFadeOutAnimationProperty

Identifies the EnableFadeAnimation dependency property.

public static readonly DependencyProperty HideAnimationProperty

Identifies the HideAnimation dependency property.

public static readonly DependencyProperty HorizontalOffsetProperty

Identifies the HorizontalOffset dependency property.

public static readonly DependencyProperty IsModalProperty

Identifies the IsModal dependency property.

public static readonly DependencyProperty IsNavigationContainerProperty

Identifies the IsNavigationContainer dependency property.

public static readonly DependencyProperty IsOpenProperty

Identifies the IsOpen dependency property.

public static readonly RoutedEvent OpenedEvent

Identifies the Opened routed event.

public static readonly DependencyProperty PopupHostProperty

Identifies the PopupHost dependency property.

public static readonly DependencyProperty PreferredHorizontalDirectionProperty

Identifies the PreferredHorizontalDirection dependency property.

public static readonly DependencyProperty PreferredPositionProperty

Identifies the PreferredPosition dependency property.

public static readonly DependencyProperty PreferredVerticalDirectionProperty

Identifies the PreferredVerticalDirection dependency property.

public static readonly DependencyProperty RelativeToProperty

Identifies the RelativeTo dependency property.

public static readonly RoutedEvent RepositionedEvent

Identifies the Repositioned routed event.

public static readonly DependencyProperty SlideDirectionProperty

Identifies the SlideDirection dependency property.

public static readonly DependencyProperty StaysOpenProperty

Identifies the StaysOpen dependency property.

public static readonly DependencyProperty TargetContentProperty

Identifies the TargetContent dependency property.

public static readonly DependencyProperty TargetDataContextProperty

Identifies the TargetDataContext dependency property.

public static readonly DependencyProperty TargetHideLatencyProperty

Identifies the TargetHideLatency dependency property.

public static readonly DependencyProperty TargetMouseClickActionProperty

Identifies the TargetMouseClickAction dependency property.

public static readonly DependencyProperty TargetMouseEnterActionProperty

Identifies the TargetMouseEnterAction dependency property.

public static readonly DependencyProperty TargetMouseLeaveActionProperty

Identifies the TargetMouseLeaveAction dependency property.

public static readonly DependencyProperty TargetPopupProperty

Identifies the TargetPopup dependency property.

public static readonly DependencyProperty TargetShowLatencyProperty

Identifies the TargetShowLatency dependency property.

public static readonly DependencyProperty VerticalOffsetProperty

Identifies the VerticalOffset dependency property.

Static Methods

public static Control GetPopupHost(UIElement element)

Gets the popup host.

Parameters

elementTargetElement.

 

public static Point GetSafeTransformPoint(ISFramework framework, UIElement element)

Gets a visual transformation point based on the given element which can be safely used in cross-platform codes.

Parameters

frameworkThe framework object
elementThe element used as the source of the visual transformation point.

 

public static object GetTargetContent(UIElement element)

Gets the content.

Parameters

elementTargetElement.

 

public static object GetTargetDataContext(UIElement element)

Gets the data context.

Parameters

elementTargetElement.

 

public static double GetTargetHideLatency(UIElement element)

Gets the hide latency.

Parameters

elementTargetElement.

 

public static PopupAction GetTargetMouseClickAction(UIElement element)

Gets the mouse click action.

Parameters

elementTargetElement.

 

public static PopupAction GetTargetMouseEnterAction(UIElement element)

Gets the mouse enter action.

Parameters

elementTargetElement.

 

public static PopupAction GetTargetMouseLeaveAction(UIElement element)

Gets the mouse leave action.

Parameters

elementTargetElement.

 

public static UXPopup GetTargetPopup(UIElement element)

Gets the target popup.

Parameters

elementUIElement.

 

public static double GetTargetShowLatency(UIElement element)

Gets the show latency.

Parameters

elementUIElement.

 

public static void SetPopupHost(UIElement element, Control value)

Sets the popup host.

Parameters

elementTarget element.
valuePopup host.

 

public static void SetTargetContent(UIElement element, object value)

Sets the content.

Parameters

elementTarget element.
valueContent.

 

public static void SetTargetDataContext(UIElement element, object value)

Sets the data context.

Parameters

elementTarget element.
valueDataContext.

 

public static void SetTargetHideLatency(UIElement element, double value)

Sets the hide latency.

Parameters

elementTarget element.
valueLatency.

 

public static void SetTargetMouseClickAction(UIElement element, PopupAction value)

Sets the mouse click action.

Parameters

elementTarget element.
valueMouse click action.

 

public static void SetTargetMouseEnterAction(UIElement element, PopupAction value)

Sets the mouse enter action.

Parameters

elementTarget element.
valueMouse enter action.

 

public static void SetTargetMouseLeaveAction(UIElement element, PopupAction value)

Sets the mouse leave action.

Parameters

elementTarget element.
valueMouse leave action.

 

public static void SetTargetPopup(UIElement element, UXPopup value)

Sets popup to target element.

Parameters

elementUIElement.
valuePopup element.

 

public static void SetTargetShowLatency(UIElement element, double value)

Sets the show latency.

Parameters

elementUIElement.
valueLatency.

 

Public Methods

public void AttachEventHandlers()

Attach built-in event handlers to control templates. Call this method if necessary.

public void DetachedEventHandlers()

Detach built-in event handlers from control templates. Call this method if necessary.

public void Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public Rect GetHostRect()

Gets host rectangle dimension.

public Point GetOffset(FrameworkElement parent, FrameworkElement content, Point relativeOffset)

Gets popup offset based on preferred position and relative offset.

Parameters

parent 
content 
relativeOffset 

 

public Rect GetPopupRect()

Gets popup rectangle dimension.

public Point GetRelativeOffset(FrameworkElement& parent)

Gets popup relative offset based on specified RelativeTo.

Parameters

parent 

 

public Rect GetVisualRect()

Gets the visual / rectangle dimension.

public void InitializeStoryboards()

Initializes storyboards.

public void InitializeTemplates()

Initializes control templates.

public void OnApplyTemplate()

Builds the visual tree for the UXPopup when a new template is applied.

public void Refresh()

Refresh popup positioning.

public void RefreshClip()

Perform clipping to the dimension of the control. Call this method if necessary

public void ResolvePosition()

Resolve popup positions.

public void SetUpdatePositionMode(UpdatePositionMode mode)

Set update position mode.

Parameters

modeUpdate position mode.

 

public void UpdatePosition()

Update popup positions.

Protected Methods

protected void OnContentChanged(object oldContent, object newContent)

Called when the value of the Content property changes.

Parameters

oldContentThe old value of the Content property.
newContentThe new value of the Content property.

 

protected void OnUnloaded(object sender, RoutedEventArgs e)

Called when the element is unloaded.

Parameters

senderThe sender of the event.
eThe event data for the property change.

 

Events

public event ISRoutedEventHandler Closed

Occurs when the popup is closed.

public event ISRoutedEventHandler GotFocus

Occurs when this element gets logical focus.

public event KeyEventHandler KeyDown

Occurs when a keyboard key is pressed while the UIElement has focus.

public event KeyEventHandler KeyUp

Occurs when a keyboard key is released while the UIElement has focus.

public event ISRoutedEventHandler LostFocus

Occurs when this element loses logical focus.

public event MouseEventHandler MouseEnter

Occurs when the mouse pointer enters the bounds of this element.

public event MouseEventHandler MouseLeave

Occurs when the mouse pointer leaves the bounds of this element.

public event MouseButtonEventHandler MouseLeftButtonDown

Occurs when the left mouse button is pressed (or when the tip of the stylus touches the tablet PC) while the mouse pointer is over a UIElement.

public event MouseButtonEventHandler MouseLeftButtonUp

Occurs when the left mouse button is released (or the tip of the stylus is removed from the tablet PC) while the mouse (or the stylus) is over a UIElement (or while a UIElement holds mouse capture).

public event MouseEventHandler MouseMove

Occurs when the mouse pointer moves while the mouse pointer is over the element.

public event MouseWheelEventHandler MouseWheel

Occurs when the mouse wheel moves while the mouse pointer is over this element.

public event ISRoutedEventHandler Opened

Occurs when the popup is opened.

public event UXPopupRoutedEventHandler Repositioned

Occurs when the popup is repositioned.