Intersoft ClientUI Documentation
RelativeTo Property
See Also  Send Feedback
Intersoft.Client.UI.Controls Namespace > UXPopup Class : RelativeTo Property






Gets or sets the target relative element.

Syntax

Visual Basic (Declaration) 
Public Property RelativeTo As FrameworkElement
Visual Basic (Usage)Copy Code
Dim instance As UXPopup
Dim value As FrameworkElement
 
instance.RelativeTo = value
 
value = instance.RelativeTo
C# 
public FrameworkElement RelativeTo {get; set;}
Delphi 
public read-write property RelativeTo: FrameworkElement; 
JScript 
public function get,set RelativeTo : FrameworkElement
Managed Extensions for C++ 
public: __property FrameworkElement* get_RelativeTo();
public: __property void set_RelativeTo( 
   FrameworkElement* value
);
C++/CLI 
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 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.