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






Gets or sets the target element.

Syntax

Visual Basic (Declaration) 
Public Property TargetElement As UIElement
Visual Basic (Usage)Copy Code
Dim instance As CallOut
Dim value As UIElement
 
instance.TargetElement = value
 
value = instance.TargetElement
C# 
public UIElement TargetElement {get; set;}
Delphi 
public read-write property TargetElement: UIElement; 
JScript 
public function get,set TargetElement : UIElement
Managed Extensions for C++ 
public: __property UIElement* get_TargetElement();
public: __property void set_TargetElement( 
   UIElement* value
);
C++/CLI 
public:
property UIElement^ TargetElement {
   UIElement^ get();
   void set (    UIElement^ value);
}

Remarks

Another key feature of CallOut control is the ability to specify TargetElement. By specifying the TargetElement property to a UIElement through element binding, the callout control automatically adjusts the pointer's position to the center point of the particular UIElement.

There are two scenarios that can be achieved with this feature:

  • Point to new element when TargetElement property is changed.
    In this scenario, you can determine whether the pointer should be adjusted using animation or without animation through the AnimatePointerWhenTargetElementChanged property.
  • Update pointer when the TargetElement is scrolled within a ScrollViewer or when its layout is updated.
    In this scenario, you can determine whether the pointer should be adjusted immediately through the AnimatePointerMode property. It is recommended to use the Delayed mode to improve user experience.
    Your application may perform slower when your user interface contains a relatively large number of elements that use opacity and animation. To avoid the performance degradation, please carefully review your user interface design and balance the use of opacity and animation.

The following example shows how to define TargetElement property using XAML.

XAML Copy Code
<Intersoft:CallOut TargetElement="{Binding SelectedElement, ElementName=ListBox1}"
    PointerPoint1="-16,0" PointerPoint3="16,0" PointerPoint2="0,20">
</Intersoft:CallOut>

<Intersoft:UXScroller>
    <Intersoft:UXListBox x:Name="ListBox1" ItemsSource="{Binding Hotels}"/>
</Intersoft:UXScroller>

The following example shows how to define TargetElement property using code behind.

C# Copy Code
private void UXListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
    UXListBox listBox = sender as UXListBox;
    this.SampleControl1.TargetElement = listBox.SelectedElement;
}
Specifing the target element will automatically move the pointer offset to point the target element.

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.