Intersoft ClientUI Documentation
TargetElement Property (CallOut)



Gets or sets the target element.
Syntax
Public Property TargetElement As UIElement
Dim instance As CallOut
Dim value As UIElement
 
instance.TargetElement = value
 
value = instance.TargetElement
public UIElement TargetElement {get; set;}
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;
}
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

CallOut Class
CallOut Members

Concepts

CallOut

Send Feedback