Intersoft ClientUI Documentation
RelativeTo Property



Gets or sets the target relative element.
Syntax
Public Property RelativeTo As FrameworkElement
Dim instance As UXPopup
Dim value As FrameworkElement
 
instance.RelativeTo = value
 
value = instance.RelativeTo
public FrameworkElement RelativeTo {get; set;}
public:
property FrameworkElement^ RelativeTo {
   FrameworkElement^ get();
   void set (    FrameworkElement^ value);
}
Remarks

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.

XAML
Copy Code
<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>
C#
Copy Code
private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
{
        this.MyPopup.IsOpen = !this.MyPopup.IsOpen;
}

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

UXPopup Class
UXPopup Members

Concepts

Popup Overview

Send Feedback